@@ -286,6 +286,7 @@ public void Eq_Typed()
286
286
Assert ( subject . Eq ( "firstName" , "Jim" ) , "{firstName: 'Jim'}" ) ;
287
287
Assert ( subject . Eq ( x => x . FavoriteColors , new [ ] { "yellow" , "green" } ) , "{colors: ['yellow', 'green']}" ) ;
288
288
Assert ( subject . Eq ( "FavoriteColors" , new [ ] { "yellow" , "green" } ) , "{colors: ['yellow', 'green']}" ) ;
289
+ Assert ( subject . Eq ( "FavoriteColors" , "yellow" ) , "{colors: 'yellow'}" ) ;
289
290
290
291
Assert ( subject . AnyEq ( x => x . FavoriteColors , "yellow" ) , "{colors: 'yellow'}" ) ;
291
292
Assert ( subject . AnyEq ( "FavoriteColors" , "yellow" ) , "{colors: 'yellow'}" ) ;
@@ -493,6 +494,7 @@ public void GreaterThan_Typed()
493
494
var subject = CreateSubject < Person > ( ) ;
494
495
Assert ( subject . Gt ( x => x . Age , 10 ) , "{age: {$gt: 10}}" ) ;
495
496
Assert ( subject . Gt ( "Age" , 10 ) , "{age: {$gt: 10}}" ) ;
497
+ Assert ( subject . Gt ( "FavoriteColors" , "green" ) , "{colors: {$gt: 'green'}}" ) ;
496
498
497
499
Assert ( subject . AnyGt ( x => x . FavoriteColors , "green" ) , "{colors: {$gt: 'green'}}" ) ;
498
500
Assert ( subject . AnyGt ( "FavoriteColors" , "green" ) , "{colors: {$gt: 'green'}}" ) ;
@@ -513,6 +515,7 @@ public void GreaterThanOrEqual_Typed()
513
515
var subject = CreateSubject < Person > ( ) ;
514
516
Assert ( subject . Gte ( x => x . Age , 10 ) , "{age: {$gte: 10}}" ) ;
515
517
Assert ( subject . Gte ( "Age" , 10 ) , "{age: {$gte: 10}}" ) ;
518
+ Assert ( subject . Gte ( "FavoriteColors" , "green" ) , "{colors: {$gte: 'green'}}" ) ;
516
519
517
520
Assert ( subject . AnyGte ( x => x . FavoriteColors , "green" ) , "{colors: {$gte: 'green'}}" ) ;
518
521
Assert ( subject . AnyGte ( "FavoriteColors" , "green" ) , "{colors: {$gte: 'green'}}" ) ;
@@ -533,6 +536,7 @@ public void In_Typed()
533
536
var subject = CreateSubject < Person > ( ) ;
534
537
Assert ( subject . In ( x => x . Age , new [ ] { 10 , 20 } ) , "{age: {$in: [10, 20]}}" ) ;
535
538
Assert ( subject . In ( "Age" , new [ ] { 10 , 20 } ) , "{age: {$in: [10, 20]}}" ) ;
539
+ Assert ( subject . In ( "FavoriteColors" , new [ ] { "blue" , "green" } ) , "{colors: {$in: ['blue','green']}}" ) ;
536
540
537
541
Assert ( subject . AnyIn ( x => x . FavoriteColors , new [ ] { "blue" , "green" } ) , "{colors: {$in: ['blue','green']}}" ) ;
538
542
Assert ( subject . AnyIn ( "FavoriteColors" , new [ ] { "blue" , "green" } ) , "{colors: {$in: ['blue','green']}}" ) ;
@@ -598,6 +602,7 @@ public void Lt_Typed()
598
602
var subject = CreateSubject < Person > ( ) ;
599
603
Assert ( subject . Lt ( x => x . Age , 10 ) , "{age: {$lt: 10}}" ) ;
600
604
Assert ( subject . Lt ( "Age" , 10 ) , "{age: {$lt: 10}}" ) ;
605
+ Assert ( subject . Lt ( "FavoriteColors" , "green" ) , "{colors: {$lt: 'green'}}" ) ;
601
606
602
607
Assert ( subject . AnyLt ( x => x . FavoriteColors , "green" ) , "{colors: {$lt: 'green'}}" ) ;
603
608
Assert ( subject . AnyLt ( "FavoriteColors" , "green" ) , "{colors: {$lt: 'green'}}" ) ;
@@ -618,6 +623,7 @@ public void Lte_Typed()
618
623
var subject = CreateSubject < Person > ( ) ;
619
624
Assert ( subject . Lte ( x => x . Age , 10 ) , "{age: {$lte: 10}}" ) ;
620
625
Assert ( subject . Lte ( "Age" , 10 ) , "{age: {$lte: 10}}" ) ;
626
+ Assert ( subject . Lte ( "FavoriteColors" , "green" ) , "{colors: {$lte: 'green'}}" ) ;
621
627
622
628
Assert ( subject . AnyLte ( x => x . FavoriteColors , "green" ) , "{colors: {$lte: 'green'}}" ) ;
623
629
Assert ( subject . AnyLte ( "FavoriteColors" , "green" ) , "{colors: {$lte: 'green'}}" ) ;
@@ -657,6 +663,7 @@ public void Ne_Typed()
657
663
var subject = CreateSubject < Person > ( ) ;
658
664
Assert ( subject . Ne ( x => x . Age , 10 ) , "{age: {$ne: 10}}" ) ;
659
665
Assert ( subject . Ne ( "Age" , 10 ) , "{age: {$ne: 10}}" ) ;
666
+ Assert ( subject . Ne ( "FavoriteColors" , "green" ) , "{colors: {$ne: 'green'}}" ) ;
660
667
661
668
Assert ( subject . AnyNe ( x => x . FavoriteColors , "green" ) , "{colors: {$ne: 'green'}}" ) ;
662
669
Assert ( subject . AnyNe ( "FavoriteColors" , "green" ) , "{colors: {$ne: 'green'}}" ) ;
0 commit comments