@@ -614,19 +614,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
614614 resource . Links . ShouldNotBeNull ( ) ;
615615 resource . Links . Self . Should ( ) . Be ( $ "/chromeWheels/{ resource . Id } ") ;
616616
617- resource . Attributes . ShouldHaveCount ( 2 ) ;
618- resource . Attributes . ShouldContainKey ( "radius" ) ;
619- resource . Attributes . ShouldContainKey ( "paintColor" ) ;
617+ resource . Attributes . ShouldOnlyContainKeys ( "radius" , "paintColor" ) ;
620618 }
621619
622620 foreach ( ResourceObject resource in responseDocument . Data . ManyValue . Where ( value => value . Type == "carbonWheels" ) )
623621 {
624622 resource . Links . ShouldNotBeNull ( ) ;
625623 resource . Links . Self . Should ( ) . Be ( $ "/carbonWheels/{ resource . Id } ") ;
626624
627- resource . Attributes . ShouldHaveCount ( 2 ) ;
628- resource . Attributes . ShouldContainKey ( "radius" ) ;
629- resource . Attributes . ShouldContainKey ( "hasTube" ) ;
625+ resource . Attributes . ShouldOnlyContainKeys ( "radius" , "hasTube" ) ;
630626 }
631627
632628 foreach ( ResourceObject resource in responseDocument . Data . ManyValue )
@@ -686,19 +682,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
686682 resource . Links . ShouldNotBeNull ( ) ;
687683 resource . Links . Self . Should ( ) . Be ( $ "/chromeWheels/{ resource . Id } ") ;
688684
689- resource . Attributes . ShouldHaveCount ( 2 ) ;
690- resource . Attributes . ShouldContainKey ( "radius" ) ;
691- resource . Attributes . ShouldContainKey ( "paintColor" ) ;
685+ resource . Attributes . ShouldOnlyContainKeys ( "radius" , "paintColor" ) ;
692686 }
693687
694688 foreach ( ResourceObject resource in responseDocument . Data . ManyValue . Where ( value => value . Type == "carbonWheels" ) )
695689 {
696690 resource . Links . ShouldNotBeNull ( ) ;
697691 resource . Links . Self . Should ( ) . Be ( $ "/carbonWheels/{ resource . Id } ") ;
698692
699- resource . Attributes . ShouldHaveCount ( 2 ) ;
700- resource . Attributes . ShouldContainKey ( "radius" ) ;
701- resource . Attributes . ShouldContainKey ( "hasTube" ) ;
693+ resource . Attributes . ShouldOnlyContainKeys ( "radius" , "hasTube" ) ;
702694 }
703695
704696 foreach ( ResourceObject resource in responseDocument . Data . ManyValue )
@@ -752,19 +744,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
752744 resource . Links . ShouldNotBeNull ( ) ;
753745 resource . Links . Self . Should ( ) . Be ( $ "/chromeWheels/{ resource . Id } ") ;
754746
755- resource . Attributes . ShouldHaveCount ( 2 ) ;
756- resource . Attributes . ShouldContainKey ( "radius" ) ;
757- resource . Attributes . ShouldContainKey ( "paintColor" ) ;
747+ resource . Attributes . ShouldOnlyContainKeys ( "radius" , "paintColor" ) ;
758748 }
759749
760750 foreach ( ResourceObject resource in responseDocument . Data . ManyValue . Where ( value => value . Type == "carbonWheels" ) )
761751 {
762752 resource . Links . ShouldNotBeNull ( ) ;
763753 resource . Links . Self . Should ( ) . Be ( $ "/carbonWheels/{ resource . Id } ") ;
764754
765- resource . Attributes . ShouldHaveCount ( 2 ) ;
766- resource . Attributes . ShouldContainKey ( "radius" ) ;
767- resource . Attributes . ShouldContainKey ( "hasTube" ) ;
755+ resource . Attributes . ShouldOnlyContainKeys ( "radius" , "hasTube" ) ;
768756 }
769757
770758 foreach ( ResourceObject resource in responseDocument . Data . ManyValue )
0 commit comments