File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
QueryKit.IntegrationTests/Tests Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,30 @@ public async Task can_filter_by_nullable_guid_contains()
455455 people . Count . Should ( ) . Be ( 1 ) ;
456456 people [ 0 ] . Id . Should ( ) . Be ( fakeRecipeOne . Id ) ;
457457 }
458+
459+ [ Fact ]
460+ public async Task can_filter_by_nullable_guid_is_something ( )
461+ {
462+ // Arrange
463+ var testingServiceScope = new TestingServiceScope ( ) ;
464+ var fakeRecipeOne = new FakeRecipeBuilder ( ) . Build ( ) ;
465+ var fakeRecipeTwo = new FakeRecipeBuilder ( ) . Build ( ) ;
466+ await testingServiceScope . InsertAsync ( fakeRecipeOne , fakeRecipeTwo ) ;
467+
468+ var input = $ """ (secondaryId == "{ fakeRecipeTwo . SecondaryId } ")""" ;
469+
470+ // Act
471+ var queryableRecipe = testingServiceScope . DbContext ( ) . Recipes ;
472+ var appliedQueryable = queryableRecipe . ApplyQueryKitFilter ( input ) ;
473+ var people = await appliedQueryable . ToListAsync ( ) ;
474+ // var people = testingServiceScope.DbContext().Recipes
475+ // .Where(x => x.SecondaryId.ToString() == null)
476+ // .ToList();
477+
478+ // Assert
479+ people . Count . Should ( ) . Be ( 1 ) ;
480+ people [ 0 ] . Id . Should ( ) . Be ( fakeRecipeTwo . Id ) ;
481+ }
458482
459483 [ Fact ]
460484 public async Task return_no_records_when_no_match ( )
You can’t perform that action at this time.
0 commit comments