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()
8383 Assert . AreEqual ( "text => ((text == \" any\" ) || (text.Length == 3))" , actual ) ;
8484 }
8585
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+
8697 [ Test ]
8798 public void Correctly_parse_two_conditional_or_operators ( )
8899 {
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ internal class ExpressionInspector
88 internal string Inspect ( LambdaExpression expression )
99 {
1010 return expression . ToString ( )
11- . Replace ( " OrElse " , " || " ) ;
11+ . Replace ( " OrElse " , " || " )
12+ . Replace ( " AndAlso " , " && " ) ;
1213 }
1314 }
1415}
You can’t perform that action at this time.
0 commit comments