public static interface GraphQlTester.Errors
Modifier and Type | Method and Description |
---|---|
GraphQlTester.Errors |
expect(Predicate<ResponseError> errorPredicate)
Use this to declare errors that are expected.
|
GraphQlTester.Errors |
filter(Predicate<ResponseError> errorPredicate)
Use this to filter out errors that are expected and can be ignored.
|
GraphQlTester.Traversable |
satisfy(Consumer<List<ResponseError>> errorsConsumer)
Inspect errors in
the response, if any.
|
GraphQlTester.Traversable |
verify()
Verify there are either no errors or that there no unexpected errors that have
not been
filtered out . |
GraphQlTester.Errors filter(Predicate<ResponseError> errorPredicate)
The configured filters are applied to all errors. Those that match
are treated as expected and are ignored on verify()
or when
traversing
to a data path.
In contrast to expect(Predicate)
, filters do not have to
match any errors, and don't imply that the errors must be present.
errorPredicate
- the error filter to addverify()
GraphQlTester.Errors expect(Predicate<ResponseError> errorPredicate)
Errors that match are treated as expected and are ignored on
verify()
or when traversing
to a data path.
In contrast to filter(Predicate)
, use of this option
does imply that errors are present or else an AssertionError
is raised.
errorPredicate
- the predicate for the expected errorGraphQlTester.Traversable verify()
filtered out
.GraphQlTester.Traversable satisfy(Consumer<List<ResponseError>> errorsConsumer)
traversing
to a data path.errorsConsumer
- to inspect errors with