Class GraphQLAssertions

Namespace
ProtoTest.GraphQL
Assembly
ProtoTest.GraphQL.dll

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

expected HttpStatusCode
negated bool

Returns

GraphQLResponse

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

code string

Returns

GraphQLResponse

HaveErrors()

Asserts the response carries at least one GraphQL error; on ShouldNot it asserts the response carries none.

public GraphQLResponse HaveErrors()

Returns

GraphQLResponse

HaveNoErrors()

Asserts the response carries no GraphQL errors; on ShouldNot it asserts the response does carry errors.

public GraphQLResponse HaveNoErrors()

Returns

GraphQLResponse