Skip to main content

APIResponseAssertions

The APIResponseAssertions class provides assertion methods that can be used to make assertions about the APIResponse in the tests.


Methods

ToBeOKAsync

Added in: v1.18 apiResponseAssertions.ToBeOKAsync

Ensures the response status code is within 200..299 range.

Usage

Returns


Properties

Not

Added in: v1.20 apiResponseAssertions.Not

Makes the assertion check for the opposite condition. For example, this code tests that the response status is not successful:

Usage

Expect(Response).Not

Type