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()
82
82
Assert . AreEqual ( "text => text == \" any\" || text.Length == 3" , actual ) ;
83
83
}
84
84
85
+ [ Test ]
85
86
public void Correctly_parse_two_conditional_or_operators ( )
86
87
{
87
88
Expression < Func < string , bool > > func =
@@ -100,6 +101,15 @@ public void Not_mistake_property_called_OrElse_for_conditional_or_operator()
100
101
var actual = sut . Inspect ( func ) ;
101
102
Assert . AreEqual ( "post => post.Title == \" \" || post.OrElse == \" \" " , actual ) ;
102
103
}
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
+ }
103
113
}
104
114
105
115
public class PostViewModel
You can’t perform that action at this time.
0 commit comments