public static interface GraphQlTester.Path extends GraphQlTester.Traversable
Modifier and Type | Method and Description |
---|---|
<D> GraphQlTester.Entity<D,?> |
entity(Class<D> entityType)
Convert the data at the given path to the target type.
|
<D> GraphQlTester.Entity<D,?> |
entity(ParameterizedTypeReference<D> entityType)
Convert the data at the given path to the target type.
|
<D> GraphQlTester.EntityList<D> |
entityList(Class<D> elementType)
Convert the data at the given path to a List of the target type.
|
<D> GraphQlTester.EntityList<D> |
entityList(ParameterizedTypeReference<D> elementType)
Convert the data at the given path to a List of the target type.
|
GraphQlTester.Path |
hasValue()
Verify there is a
non-null value or a non-empty list at the current path. |
GraphQlTester.Traversable |
matchesJson(String expectedJson)
Parse the JSON at the given path and the given expected JSON and assert that
the two are "similar".
|
GraphQlTester.Traversable |
matchesJsonStrictly(String expectedJson)
Parse the JSON at the given path and the given expected JSON and assert that
the two are "similar" so they contain the same attribute-value pairs regardless
of formatting, along with lenient checking, e.g.
|
GraphQlTester.Path |
pathDoesNotExist()
Verify the current path does not exist.
|
GraphQlTester.Path |
valueIsNull()
Verify there is a
null value at the current path. |
path
GraphQlTester.Path hasValue()
non-null
value or a non-empty list at the current path.Path
spec for further assertionsGraphQlTester.Path valueIsNull()
null
value at the current path.GraphQlTester.Path pathDoesNotExist()
Path
spec for further assertions<D> GraphQlTester.Entity<D,?> entity(Class<D> entityType)
D
- the target entity typeentityType
- the type to convert toEntity
spec to verify the decoded value with<D> GraphQlTester.Entity<D,?> entity(ParameterizedTypeReference<D> entityType)
D
- the target entity typeentityType
- the type to convert toEntity
spec to verify the decoded value with<D> GraphQlTester.EntityList<D> entityList(Class<D> elementType)
D
- the target entity typeelementType
- the type of element to convert toEntityList
spec to verify the decoded values with<D> GraphQlTester.EntityList<D> entityList(ParameterizedTypeReference<D> elementType)
D
- the target entity typeelementType
- the type to convert toEntityList
spec to verify the decoded values withGraphQlTester.Traversable matchesJson(String expectedJson)
Use of this option requires the JSONassert library on to be on the classpath.
expectedJson
- the expected JSONTraversable
spec to select a different pathJsonExpectationsHelper.assertJsonEqual(String,
String)
GraphQlTester.Traversable matchesJsonStrictly(String expectedJson)
expectedJson
- the expected JSONTraversable
spec to select a different pathJsonExpectationsHelper.assertJsonEqual(String,
String, boolean)