Definition
Assembly: CloudNimble.Breakdance.DotHttp.dll Namespace: CloudNimble.Breakdance.DotHttp Inheritance: System.ObjectSyntax
Summary
Provides smart assertion helpers for HTTP responses that go beyond simple status code checking.Remarks
Detects common API error patterns like 200 OK responses that contain error payloads.Examples
Methods
AssertBodyContainsAsync
Validates that the response body contains the specified text.Syntax
Parameters
Returns
Type:System.Threading.Tasks.Task
Examples
AssertContentType
Validates that the response Content-Type matches the expected value.Syntax
Parameters
Examples
AssertHeader
Validates that the response contains a specific header.Syntax
Parameters
Examples
AssertNoErrorsInBodyAsync
Validates that the response body does not contain error patterns.Syntax
Parameters
Returns
Type:System.Threading.Tasks.Task
Examples
AssertStatusCodeAsync
Validates that the response status code matches the expected value.Syntax
Parameters
Returns
Type:System.Threading.Tasks.Task
Examples
AssertValidResponseAsync
Validates that the response meets common API contract expectations.Syntax
Parameters
Returns
Type:System.Threading.Tasks.Task
A task that completes when validation is done.