Commit cb77861 1 parent 74da34f commit cb77861 Copy full SHA for cb77861
File tree 1 file changed +17
-0
lines changed
test/System.Linq.Dynamic.Core.Tests
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,23 @@ public void Where_Dynamic_StringQuoted()
179
179
Assert . Equal ( expected , result2b ) ;
180
180
}
181
181
182
+ [ Fact ]
183
+ public void Where_Dynamic_ConcatString ( )
184
+ {
185
+ // Arrange
186
+ var qry = User . GenerateSampleModels ( 2 ) . AsQueryable ( ) ;
187
+
188
+ // Act
189
+ var expected = qry . Where ( u => ( u . UserName + u . UserName ) . Length > 10 ) . ToArray ( ) ;
190
+
191
+ var result1 = qry . Where ( "(UserName + UserName).Length > 10" ) . ToArray ( ) ;
192
+ var result2 = qry . Where ( "u => (u.UserName + u.UserName).Length > 10" ) . ToArray ( ) ;
193
+
194
+ // Assert
195
+ result1 . Should ( ) . BeEquivalentTo ( expected ) ;
196
+ result2 . Should ( ) . BeEquivalentTo ( expected ) ;
197
+ }
198
+
182
199
[ Fact ]
183
200
public void Where_Dynamic_EmptyString ( )
184
201
{
You can’t perform that action at this time.
0 commit comments