File: class-apiresponseassertions.md | Updated: 11/18/2025
On this page
The APIResponseAssertions class provides assertion methods that can be used to make assertions about the APIResponse in the tests.
Methods
Added in: v1.18 apiResponseAssertions.ToBeOKAsync
Ensures the response status code is within 200..299 range.
Usage
Returns
Properties
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