Improve readability of assertion messages
Closes gh-361
This commit is contained in:
@@ -152,6 +152,11 @@ public class DefaultExecutionGraphQlResponse extends AbstractGraphQlResponse imp
|
||||
return (this.delegate.getExtensions() != null ? this.delegate.getExtensions() : Collections.emptyMap());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.delegate.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -205,7 +205,8 @@ public class GraphQlClientTests extends GraphQlClientTestSupport {
|
||||
assertThat(nameField.getError().getParsedPath()).containsExactly("me", "name");
|
||||
assertThatThrownBy(() -> nameField.toEntity(String.class))
|
||||
.as("Decoding field null with direct field error should be rejected")
|
||||
.isInstanceOf(FieldAccessException.class);
|
||||
.isInstanceOf(FieldAccessException.class)
|
||||
.hasMessageContaining("Test error");
|
||||
|
||||
ClientResponseField nonExistingField = response.field("me.name.other");
|
||||
assertThat(nonExistingField.hasValue()).isFalse();
|
||||
|
||||
Reference in New Issue
Block a user