Skip to content

Commit

Permalink
Add test for DynamicExpressionParser string with a dot (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefH authored Mar 6, 2023
1 parent ec900ed commit e0e2f9a
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,23 @@ public void DynamicExpressionParser_ParseLambda_Double(string culture, string ex
result.Should().Be(expected);
}

public class EntityDbo
{
public string Name { get; set; }
}

[Fact]
public void DynamicExpressionParser_ParseLambda_StringLiteral_WithADot()
{
// Act
var expression = DynamicExpressionParser.ParseLambda(typeof(EntityDbo), typeof(bool), "Name == @0", "System.Int32");
var del = expression.Compile();
var result = del.DynamicInvoke(new EntityDbo { Name = "System.Int32" });

// Assert
result.Should().Be(true);
}

[Fact]
public void DynamicExpressionParser_ParseLambda_StringLiteral_ReturnsBooleanLambdaExpression()
{
Expand Down

0 comments on commit e0e2f9a

Please sign in to comment.