File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
TestStack.FluentMVCTesting.Tests/Internal Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,24 @@ public void Correctly_parse_equality_comparison_with_int_operands()
26
26
Assert . AreEqual ( "number => number == 5" , actual ) ;
27
27
}
28
28
29
+ [ Test ]
30
+ public void Correctly_parse_equality_comparison_with_property_operand ( )
31
+ {
32
+ Expression < Func < PostViewModel , bool > > func = post => post . Title == "A" ;
33
+ ExpressionInspector sut = new ExpressionInspector ( ) ;
34
+ var actual = sut . Inspect ( func ) ;
35
+ Assert . AreEqual ( "post => post.Title == \" A\" " , actual ) ;
36
+ }
37
+
38
+ [ Test ]
39
+ public void Correctly_parse_equality_comparison_with_property_operands ( )
40
+ {
41
+ Expression < Func < PostViewModel , bool > > func = post => post . Title == post . Slug ;
42
+ ExpressionInspector sut = new ExpressionInspector ( ) ;
43
+ var actual = sut . Inspect ( func ) ;
44
+ Assert . AreEqual ( "post => post.Title == post.Slug" , actual ) ;
45
+ }
46
+
29
47
[ Test ]
30
48
public void Correctly_parse_inequality_comparison ( )
31
49
{
@@ -54,4 +72,10 @@ public void Correctly_parse_relational_comparison()
54
72
Assert . AreEqual ( "number => number < 5" , actual ) ;
55
73
}
56
74
}
75
+
76
+ public class PostViewModel
77
+ {
78
+ public string Title { get ; set ; }
79
+ public string Slug { get ; set ; }
80
+ }
57
81
}
You can’t perform that action at this time.
0 commit comments