File tree Expand file tree Collapse file tree 3 files changed +104
-73
lines changed
QueryKit.IntegrationTests/Tests Expand file tree Collapse file tree 3 files changed +104
-73
lines changed Original file line number Diff line number Diff line change @@ -740,6 +740,32 @@ public async Task can_filter_by_nullable_guid_is_something()
740740 people . Count . Should ( ) . Be ( 1 ) ;
741741 people [ 0 ] . Id . Should ( ) . Be ( fakeRecipeTwo . Id ) ;
742742 }
743+
744+ [ Fact ]
745+ public async Task can_filter_by_nullable_guid_is_null ( )
746+ {
747+ // Arrange
748+ var testingServiceScope = new TestingServiceScope ( ) ;
749+ var fakeRecipeOne = new FakeRecipeBuilder ( )
750+ . WithSecondaryId ( null )
751+ . Build ( ) ;
752+ var fakeRecipeTwo = new FakeRecipeBuilder ( ) . Build ( ) ;
753+ await testingServiceScope . InsertAsync ( fakeRecipeOne , fakeRecipeTwo ) ;
754+
755+ var input = $ """ (secondaryId == null)""" ;
756+
757+ // Act
758+ var queryableRecipe = testingServiceScope . DbContext ( ) . Recipes ;
759+ var appliedQueryable = queryableRecipe . ApplyQueryKitFilter ( input ) ;
760+ var people = await appliedQueryable . ToListAsync ( ) ;
761+ // var people = testingServiceScope.DbContext().Recipes
762+ // .Where(x => x.SecondaryId == null)
763+ // .ToList();
764+
765+ // Assert
766+ people . Count . Should ( ) . Be ( 1 ) ;
767+ people [ 0 ] . Id . Should ( ) . Be ( fakeRecipeOne . Id ) ;
768+ }
743769
744770 [ Fact ]
745771 public async Task return_no_records_when_no_match ( )
You can’t perform that action at this time.
0 commit comments