@@ -261,7 +261,7 @@ public async Task Cannot_create_resource_with_unknown_attribute()
261
261
error . Detail . Should ( ) . Be ( "Attribute 'doesNotExist' does not exist on resource type 'playlists'." ) ;
262
262
error . Source . Should ( ) . NotBeNull ( ) ;
263
263
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data/attributes/doesNotExist" ) ;
264
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
264
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
265
265
}
266
266
267
267
[ Fact ]
@@ -366,7 +366,7 @@ public async Task Cannot_create_resource_with_unknown_relationship()
366
366
error . Detail . Should ( ) . Be ( "Relationship 'doesNotExist' does not exist on resource type 'lyrics'." ) ;
367
367
error . Source . Should ( ) . NotBeNull ( ) ;
368
368
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data/relationships/doesNotExist" ) ;
369
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
369
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
370
370
}
371
371
372
372
[ Fact ]
@@ -478,7 +478,7 @@ public async Task Cannot_create_resource_with_client_generated_ID()
478
478
error . Detail . Should ( ) . BeNull ( ) ;
479
479
error . Source . Should ( ) . NotBeNull ( ) ;
480
480
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data/id" ) ;
481
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
481
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
482
482
}
483
483
484
484
[ Fact ]
@@ -513,7 +513,7 @@ public async Task Cannot_create_resource_for_href_element()
513
513
error . Detail . Should ( ) . BeNull ( ) ;
514
514
error . Source . Should ( ) . NotBeNull ( ) ;
515
515
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/href" ) ;
516
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
516
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
517
517
}
518
518
519
519
[ Fact ]
@@ -551,7 +551,7 @@ public async Task Cannot_create_resource_for_ref_element()
551
551
error . Detail . Should ( ) . BeNull ( ) ;
552
552
error . Source . Should ( ) . NotBeNull ( ) ;
553
553
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/ref" ) ;
554
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
554
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
555
555
}
556
556
557
557
[ Fact ]
@@ -585,7 +585,7 @@ public async Task Cannot_create_resource_for_missing_data()
585
585
error . Detail . Should ( ) . BeNull ( ) ;
586
586
error . Source . Should ( ) . NotBeNull ( ) ;
587
587
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]" ) ;
588
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
588
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
589
589
}
590
590
591
591
[ Fact ]
@@ -620,7 +620,7 @@ public async Task Cannot_create_resource_for_null_data()
620
620
error . Detail . Should ( ) . BeNull ( ) ;
621
621
error . Source . Should ( ) . NotBeNull ( ) ;
622
622
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data" ) ;
623
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
623
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
624
624
}
625
625
626
626
[ Fact ]
@@ -667,7 +667,7 @@ public async Task Cannot_create_resource_for_array_data()
667
667
error . Detail . Should ( ) . BeNull ( ) ;
668
668
error . Source . Should ( ) . NotBeNull ( ) ;
669
669
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data" ) ;
670
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
670
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
671
671
}
672
672
673
673
[ Fact ]
@@ -707,7 +707,7 @@ public async Task Cannot_create_resource_for_missing_type()
707
707
error . Detail . Should ( ) . BeNull ( ) ;
708
708
error . Source . Should ( ) . NotBeNull ( ) ;
709
709
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data" ) ;
710
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
710
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
711
711
}
712
712
713
713
[ Fact ]
@@ -745,7 +745,7 @@ public async Task Cannot_create_resource_for_unknown_type()
745
745
error . Detail . Should ( ) . Be ( $ "Resource type '{ Unknown . ResourceType } ' does not exist.") ;
746
746
error . Source . Should ( ) . NotBeNull ( ) ;
747
747
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data/type" ) ;
748
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
748
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
749
749
}
750
750
751
751
[ Fact ]
@@ -790,7 +790,7 @@ public async Task Cannot_create_resource_with_readonly_attribute()
790
790
error . Detail . Should ( ) . Be ( "Attribute 'isArchived' on resource type 'playlists' is read-only." ) ;
791
791
error . Source . Should ( ) . NotBeNull ( ) ;
792
792
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data/attributes/isArchived" ) ;
793
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
793
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
794
794
}
795
795
796
796
[ Fact ]
@@ -832,7 +832,7 @@ public async Task Cannot_create_resource_with_incompatible_attribute_value()
832
832
error . Detail . Should ( ) . Be ( "Failed to convert attribute 'bornAt' with value '12345' of type 'Number' to type 'DateTimeOffset'." ) ;
833
833
error . Source . Should ( ) . NotBeNull ( ) ;
834
834
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data/attributes/bornAt" ) ;
835
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
835
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
836
836
}
837
837
838
838
[ Fact ]
@@ -985,6 +985,6 @@ public async Task Cannot_assign_attribute_with_blocked_capability()
985
985
error . Detail . Should ( ) . Be ( "The attribute 'createdAt' on resource type 'lyrics' cannot be assigned to." ) ;
986
986
error . Source . Should ( ) . NotBeNull ( ) ;
987
987
error . Source . Pointer . Should ( ) . Be ( "/atomic:operations[0]/data/attributes/createdAt" ) ;
988
- error . Meta . Should ( ) . ContainKey ( "requestBody" ) . WhoseValue . Should ( ) . NotBeNull ( ) . And . Subject . ToString ( ) . Should ( ) . NotBeEmpty ( ) ;
988
+ error . Meta . Should ( ) . HaveRequestBody ( ) ;
989
989
}
990
990
}
0 commit comments