Class GraphQLAssertions
The assertions reachable through Should and ShouldNot; the shared facade owns the polarity, so a negated error assertion asks for the opposite of its positive spelling.
public class GraphQLAssertions : ProtoHttpAssertions<GraphQLResponse>
- Inheritance
-
GraphQLAssertions
- Derived
- Inherited Members
- Extension Methods
Methods
AssertStatus(HttpStatusCode, bool)
Runs the protocol's status assertion with the facade's polarity.
protected override GraphQLResponse AssertStatus(HttpStatusCode expected, bool negated)
Parameters
expectedHttpStatusCodenegatedbool
Returns
HaveError(string)
Asserts the response carries a GraphQL error whose extensions.code is
code, compared case-insensitively; on
ShouldNot it asserts no error carries that code.
public GraphQLResponse HaveError(string code)
Parameters
codestring
Returns
HaveErrors()
Asserts the response carries at least one GraphQL error; on ShouldNot it asserts the response carries none.
public GraphQLResponse HaveErrors()
Returns
HaveNoErrors()
Asserts the response carries no GraphQL errors; on ShouldNot it asserts the response does carry errors.
public GraphQLResponse HaveNoErrors()