File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
main/java/org/springframework/graphql/test/tester
test/java/org/springframework/graphql/test/tester Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -563,9 +563,11 @@ public EntityList<E> doesNotContain(E... values) {
563
563
public EntityList <E > containsExactly (E ... values ) {
564
564
doAssert (() -> {
565
565
List <E > expected = Arrays .asList (values );
566
+ List <E > actual = getEntity ();
566
567
AssertionErrors .assertTrue (
567
- "List at path '" + getPath () + "' should have contained exactly " + expected ,
568
- getEntity ().equals (expected ));
568
+ "List at path '" + getPath () + "' should have contained exactly " + expected + ", " +
569
+ "but did contain " + actual ,
570
+ actual .equals (expected ));
569
571
});
570
572
return this ;
571
573
}
Original file line number Diff line number Diff line change @@ -179,7 +179,8 @@ void entityList() {
179
179
180
180
assertThatThrownBy (() -> entityList .containsExactly (leia , han ))
181
181
.as ("Should be exactly the same order" )
182
- .hasMessageStartingWith ("List at path 'me.friends' should have contained exactly" );
182
+ .hasMessageStartingWith ("List at path 'me.friends' should have contained exactly" )
183
+ .hasMessageContaining ("but did contain " );
183
184
184
185
response .path ("me.friends" )
185
186
.entityList (new ParameterizedTypeReference <MovieCharacter >() {})
You can’t perform that action at this time.
0 commit comments