File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
test/System.Linq.Dynamic.Core.Tests/TypeConvertors Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -165,11 +165,11 @@ private class EntityWithInstant
165165 }
166166
167167 [ Theory ]
168- [ InlineData ( ">" ) ]
169- [ InlineData ( ">=" ) ]
170- [ InlineData ( "<" ) ]
171- [ InlineData ( "<=" ) ]
172- public void FilterByInstant_WithRelationalOperator ( string op )
168+ [ InlineData ( ">" , 1 ) ]
169+ [ InlineData ( ">=" , 2 ) ]
170+ [ InlineData ( "<" , 1 ) ]
171+ [ InlineData ( "<=" , 2 ) ]
172+ public void FilterByInstant_WithRelationalOperator ( string op , int expectedCount )
173173 {
174174 // Arrange
175175 var now = SystemClock . Instance . GetCurrentInstant ( ) ;
@@ -184,15 +184,15 @@ public void FilterByInstant_WithRelationalOperator(string op)
184184 var result = data . Where ( $ "Timestamp { op } @0", now ) . ToList ( ) ;
185185
186186 // Assert
187- result . Should ( ) . NotBeNull ( ) ;
187+ result . Should ( ) . HaveCount ( expectedCount ) ;
188188 }
189189
190190 [ Theory ]
191- [ InlineData ( ">" ) ]
192- [ InlineData ( ">=" ) ]
193- [ InlineData ( "<" ) ]
194- [ InlineData ( "<=" ) ]
195- public void FilterByNullableInstant_WithRelationalOperator ( string op )
191+ [ InlineData ( ">" , 1 ) ]
192+ [ InlineData ( ">=" , 2 ) ]
193+ [ InlineData ( "<" , 1 ) ]
194+ [ InlineData ( "<=" , 2 ) ]
195+ public void FilterByNullableInstant_WithRelationalOperator ( string op , int expectedCount )
196196 {
197197 // Arrange
198198 var now = SystemClock . Instance . GetCurrentInstant ( ) ;
@@ -207,8 +207,8 @@ public void FilterByNullableInstant_WithRelationalOperator(string op)
207207 // Act
208208 var result = data . Where ( $ "TimestampNullable { op } @0", now ) . ToList ( ) ;
209209
210- // Assert
211- result . Should ( ) . NotBeNull ( ) ;
210+ // Assert - null values are excluded from comparison results
211+ result . Should ( ) . HaveCount ( expectedCount ) ;
212212 }
213213
214214 public class LocalDateConverter : TypeConverter
You can’t perform that action at this time.
0 commit comments