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.18Ensures the response status code is within 200..299
range.
使用方式
傳回值
屬性 (Properties)
Not
Added in: v1.20Makes the assertion check for the opposite condition. For example, this code tests that the response status is not successful:
使用方式
Expect(Response).Not
型別 (Type)