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) {
563563 public EntityList <E > containsExactly (E ... values ) {
564564 doAssert (() -> {
565565 List <E > expected = Arrays .asList (values );
566+ List <E > actual = getEntity ();
566567 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 ));
569571 });
570572 return this ;
571573 }
Original file line number Diff line number Diff line change @@ -179,7 +179,8 @@ void entityList() {
179179
180180 assertThatThrownBy (() -> entityList .containsExactly (leia , han ))
181181 .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 " );
183184
184185 response .path ("me.friends" )
185186 .entityList (new ParameterizedTypeReference <MovieCharacter >() {})
You can’t perform that action at this time.
0 commit comments