@@ -4,13 +4,13 @@ public sealed class FilterTest
44{
55 private static readonly Dictionary < string , User > _users = new Dictionary < string , User >
66 {
7- [ "John" ] = new User { Age = 2 , Firstname = "John" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "2004-01-31 23:59:59" ) , BalanceDecimal = 1.50m } ,
8- [ "Jane" ] = new User { Age = 1 , Firstname = "Jane" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "2020-05-09 15:30:00" ) , BalanceDecimal = 0 } ,
9- [ "Apple" ] = new User { Age = 2 , Firstname = "Apple" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "1980-12-31 00:00:01" ) , BalanceFloat = 1204050.98f } ,
10- [ "Harry" ] = new User { Age = 1 , Firstname = "Harry" , UserId = Guid . Parse ( "e4c7772b-8947-4e46-98ed-644b417d2a08" ) , DateOfBirth = DateTime . Parse ( "2002-08-01" ) , BalanceDecimal = 0.5372958205929493m } ,
11- [ "Doe" ] = new User { Age = 3 , Firstname = "Doe" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "2023-07-26 12:00:30" ) , BalanceDecimal = null } ,
12- [ "Egg" ] = new User { Age = 3 , Firstname = "Egg" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "2000-01-01 00:00:00" ) , BalanceDouble = 1334534453453433.33435443343231235652d } ,
13- [ "NullUser" ] = new User { Age = 4 , Firstname = "NullUser" , UserId = Guid . Parse ( "11111111-1111-1111-1111-111111111111" ) , DateOfBirth = null , BalanceDecimal = null , BalanceDouble = null , BalanceFloat = null } ,
7+ [ "John" ] = new User { Age = 2 , Firstname = "John" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "2004-01-31 23:59:59" ) , BalanceDecimal = 1.50m , IsEmailVerified = true } ,
8+ [ "Jane" ] = new User { Age = 1 , Firstname = "Jane" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "2020-05-09 15:30:00" ) , BalanceDecimal = 0 , IsEmailVerified = false } ,
9+ [ "Apple" ] = new User { Age = 2 , Firstname = "Apple" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "1980-12-31 00:00:01" ) , BalanceFloat = 1204050.98f , IsEmailVerified = true } ,
10+ [ "Harry" ] = new User { Age = 1 , Firstname = "Harry" , UserId = Guid . Parse ( "e4c7772b-8947-4e46-98ed-644b417d2a08" ) , DateOfBirth = DateTime . Parse ( "2002-08-01" ) , BalanceDecimal = 0.5372958205929493m , IsEmailVerified = false } ,
11+ [ "Doe" ] = new User { Age = 3 , Firstname = "Doe" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "2023-07-26 12:00:30" ) , BalanceDecimal = null , IsEmailVerified = true } ,
12+ [ "Egg" ] = new User { Age = 3 , Firstname = "Egg" , UserId = Guid . Parse ( "58cdeca3-645b-457c-87aa-7d5f87734255" ) , DateOfBirth = DateTime . Parse ( "2000-01-01 00:00:00" ) , BalanceDouble = 1334534453453433.33435443343231235652d , IsEmailVerified = false } ,
13+ [ "NullUser" ] = new User { Age = 4 , Firstname = "NullUser" , UserId = Guid . Parse ( "11111111-1111-1111-1111-111111111111" ) , DateOfBirth = null , BalanceDecimal = null , BalanceDouble = null , BalanceFloat = null , IsEmailVerified = true } ,
1414 } ;
1515
1616 public static IEnumerable < object [ ] > Parameters ( )
@@ -264,6 +264,36 @@ public static IEnumerable<object[]> Parameters()
264264 "firstname eq 'Doe' and balanceDecimal eq null" ,
265265 new [ ] { _users [ "Doe" ] }
266266 } ;
267+
268+ yield return new object [ ] {
269+ "isEmailVerified eq true" ,
270+ new [ ] { _users [ "John" ] , _users [ "Apple" ] , _users [ "Doe" ] , _users [ "NullUser" ] }
271+ } ;
272+
273+ yield return new object [ ] {
274+ "isEmailVerified eq false" ,
275+ new [ ] { _users [ "Jane" ] , _users [ "Harry" ] , _users [ "Egg" ] }
276+ } ;
277+
278+ yield return new object [ ] {
279+ "isEmailVerified ne true" ,
280+ new [ ] { _users [ "Jane" ] , _users [ "Harry" ] , _users [ "Egg" ] }
281+ } ;
282+
283+ yield return new object [ ] {
284+ "isEmailVerified ne false" ,
285+ new [ ] { _users [ "John" ] , _users [ "Apple" ] , _users [ "Doe" ] , _users [ "NullUser" ] }
286+ } ;
287+
288+ yield return new object [ ] {
289+ "age gt 2 and isEmailVerified eq true" ,
290+ new [ ] { _users [ "Doe" ] , _users [ "NullUser" ] }
291+ } ;
292+
293+ yield return new object [ ] {
294+ "isEmailVerified eq false or age eq 2" ,
295+ new [ ] { _users [ "John" ] , _users [ "Jane" ] , _users [ "Apple" ] , _users [ "Harry" ] , _users [ "Egg" ] }
296+ } ;
267297 }
268298
269299 [ Theory ]
0 commit comments