@@ -413,11 +413,13 @@ public async Task can_filter_by_guid_contains()
413413 {
414414 // Arrange
415415 var testingServiceScope = new TestingServiceScope ( ) ;
416- var fakePersonOne = new FakeTestingPersonBuilder ( ) . Build ( ) ;
416+ var fakePersonOne = new FakeTestingPersonBuilder ( )
417+ . WithId ( Guid . Parse ( "3644bceb-d362-4044-9edb-a3ec71c9b1a1" ) )
418+ . Build ( ) ;
417419 var fakePersonTwo = new FakeTestingPersonBuilder ( ) . Build ( ) ;
418420 await testingServiceScope . InsertAsync ( fakePersonOne , fakePersonTwo ) ;
419421
420- var input = $ """ { nameof ( TestingPerson . Id ) } @=* "{ fakePersonOne . Id } " """ ;
422+ var input = $ """ (id @=* "9edb") """ ;
421423
422424 // Act
423425 var queryablePeople = testingServiceScope . DbContext ( ) . People ;
@@ -428,6 +430,31 @@ public async Task can_filter_by_guid_contains()
428430 people . Count . Should ( ) . Be ( 1 ) ;
429431 people [ 0 ] . Id . Should ( ) . Be ( fakePersonOne . Id ) ;
430432 }
433+
434+ [ Fact ]
435+ public async Task can_filter_by_nullable_guid_contains ( )
436+ {
437+ // Arrange
438+ var testingServiceScope = new TestingServiceScope ( ) ;
439+ var fakeRecipeOne = new FakeRecipeBuilder ( )
440+ . WithSecondaryId ( Guid . Parse ( "385b1d2c-3b10-4ce0-b19b-f2b76280d57d" ) )
441+ . Build ( ) ;
442+ var fakeRecipeTwo = new FakeRecipeBuilder ( ) . Build ( ) ;
443+ await testingServiceScope . InsertAsync ( fakeRecipeOne , fakeRecipeTwo ) ;
444+
445+ var input = $ """ (secondaryId @=* "4ce0")""" ;
446+
447+ // Act
448+ var queryableRecipe = testingServiceScope . DbContext ( ) . Recipes ;
449+ var appliedQueryable = queryableRecipe . ApplyQueryKitFilter ( input ) ;
450+ var people = await appliedQueryable . ToListAsync ( ) ;
451+ // var people = testingServiceScope.DbContext().Recipes
452+ // .Where(x => x.SecondaryId.ToString().Contains("4ce0")).ToList();
453+
454+ // Assert
455+ people . Count . Should ( ) . Be ( 1 ) ;
456+ people [ 0 ] . Id . Should ( ) . Be ( fakeRecipeOne . Id ) ;
457+ }
431458
432459 [ Fact ]
433460 public async Task return_no_records_when_no_match ( )
0 commit comments