File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
TestStack.FluentMVCTesting.Tests/Internal
TestStack.FluentMvcTesting/Internal Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,17 @@ public void Correctly_parse_conditional_or_operator()
83
83
Assert . AreEqual ( "text => ((text == \" any\" ) || (text.Length == 3))" , actual ) ;
84
84
}
85
85
86
+
87
+ [ Test ]
88
+ public void Correctly_parse_conditional_and_operator ( )
89
+ {
90
+ Expression < Func < string , bool > > func =
91
+ text => text == "any" && text . Length == 3 ;
92
+ ExpressionInspector sut = new ExpressionInspector ( ) ;
93
+ var actual = sut . Inspect ( func ) ;
94
+ Assert . AreEqual ( "text => ((text == \" any\" ) && (text.Length == 3))" , actual ) ;
95
+ }
96
+
86
97
[ Test ]
87
98
public void Correctly_parse_two_conditional_or_operators ( )
88
99
{
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ internal class ExpressionInspector
8
8
internal string Inspect ( LambdaExpression expression )
9
9
{
10
10
return expression . ToString ( )
11
- . Replace ( " OrElse " , " || " ) ;
11
+ . Replace ( " OrElse " , " || " )
12
+ . Replace ( " AndAlso " , " && " ) ;
12
13
}
13
14
}
14
15
}
You can’t perform that action at this time.
0 commit comments