File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
TestStack.FluentMVCTesting.Tests/Internal Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ public void Correctly_parse_conditional_or_operator()
8282 Assert . AreEqual ( "text => text == \" any\" || text.Length == 3" , actual ) ;
8383 }
8484
85+ [ Test ]
8586 public void Correctly_parse_two_conditional_or_operators ( )
8687 {
8788 Expression < Func < string , bool > > func =
@@ -100,6 +101,15 @@ public void Not_mistake_property_called_OrElse_for_conditional_or_operator()
100101 var actual = sut . Inspect ( func ) ;
101102 Assert . AreEqual ( "post => post.Title == \" \" || post.OrElse == \" \" " , actual ) ;
102103 }
104+
105+ [ Test ]
106+ public void Correctly_parse_expression_whose_source_text_contains_parentheses ( )
107+ {
108+ Expression < Func < PostViewModel , bool > > func = post => post . Title . Contains ( "" ) ;
109+ ExpressionInspector sut = new ExpressionInspector ( ) ;
110+ var actual = sut . Inspect ( func ) ;
111+ Assert . AreEqual ( "post => post.Title.Contains(\" \" )" , actual ) ;
112+ }
103113 }
104114
105115 public class PostViewModel
You can’t perform that action at this time.
0 commit comments