Skip to content

Commit e0e2f9a

Browse files
authored
Add test for DynamicExpressionParser string with a dot (#685)
1 parent ec900ed commit e0e2f9a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/System.Linq.Dynamic.Core.Tests/DynamicExpressionParserTests.cs

+17
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,23 @@ public void DynamicExpressionParser_ParseLambda_Double(string culture, string ex
807807
result.Should().Be(expected);
808808
}
809809

810+
public class EntityDbo
811+
{
812+
public string Name { get; set; }
813+
}
814+
815+
[Fact]
816+
public void DynamicExpressionParser_ParseLambda_StringLiteral_WithADot()
817+
{
818+
// Act
819+
var expression = DynamicExpressionParser.ParseLambda(typeof(EntityDbo), typeof(bool), "Name == @0", "System.Int32");
820+
var del = expression.Compile();
821+
var result = del.DynamicInvoke(new EntityDbo { Name = "System.Int32" });
822+
823+
// Assert
824+
result.Should().Be(true);
825+
}
826+
810827
[Fact]
811828
public void DynamicExpressionParser_ParseLambda_StringLiteral_ReturnsBooleanLambdaExpression()
812829
{

0 commit comments

Comments
 (0)