Class StubHttpSnapshotConfigurationExtensions
- Namespace
- XBullet.EasyTesting.Snapshots
- Assembly
- XBullet.EasyTesting.Snapshots.Http.dll
Callback-configured overloads for outbound HTTP stub snapshot assertions.
public static class StubHttpSnapshotConfigurationExtensions
- Inheritance
-
StubHttpSnapshotConfigurationExtensions
- Inherited Members
Methods
ShouldMatchExchangeSnapshot(StubHttpExchange, Action<SnapshotSettings>, CancellationToken, string, string)
Configures snapshot settings inline and asserts one captured exchange.
public static Task ShouldMatchExchangeSnapshot(this StubHttpExchange exchange, Action<SnapshotSettings> configureSnapshot, CancellationToken cancellationToken = default, string sourceFile = "", string testName = "")
Parameters
exchangeStubHttpExchangeThe captured exchange to snapshot.
configureSnapshotAction<SnapshotSettings>A callback that configures independent effective snapshot settings.
cancellationTokenCancellationTokenA token that cancels snapshot locking and file operations.
sourceFilestringThe compiler-supplied source file used to locate the snapshot.
testNamestringThe compiler-supplied test name used to name the snapshot.
Returns
- Task
A task that completes when the snapshot has been verified or updated.
ShouldMatchExchangeSnapshot(StubHttpExchange, Action<StubHttpExchangeSnapshotOptions>, Action<SnapshotSettings>?, CancellationToken, string, string)
Configures exchange options and optional snapshot settings inline.
public static Task ShouldMatchExchangeSnapshot(this StubHttpExchange exchange, Action<StubHttpExchangeSnapshotOptions> configureExchange, Action<SnapshotSettings>? configureSnapshot = null, CancellationToken cancellationToken = default, string sourceFile = "", string testName = "")
Parameters
exchangeStubHttpExchangeThe captured exchange to snapshot.
configureExchangeAction<StubHttpExchangeSnapshotOptions>A callback that configures exchange snapshot options.
configureSnapshotAction<SnapshotSettings>An optional callback that configures independent effective snapshot settings.
cancellationTokenCancellationTokenA token that cancels snapshot locking and file operations.
sourceFilestringThe compiler-supplied source file used to locate the snapshot.
testNamestringThe compiler-supplied test name used to name the snapshot.
Returns
- Task
A task that completes when the snapshot has been verified or updated.
ShouldMatchExchangesSnapshot(StubHttpMessageHandler, Action<SnapshotSettings>, CancellationToken, string, string)
Configures snapshot settings inline and asserts all captured exchanges.
public static Task ShouldMatchExchangesSnapshot(this StubHttpMessageHandler handler, Action<SnapshotSettings> configureSnapshot, CancellationToken cancellationToken = default, string sourceFile = "", string testName = "")
Parameters
handlerStubHttpMessageHandlerThe handler whose captured exchanges are snapshotted.
configureSnapshotAction<SnapshotSettings>A callback that configures independent effective snapshot settings.
cancellationTokenCancellationTokenA token that cancels snapshot locking and file operations.
sourceFilestringThe compiler-supplied source file used to locate the snapshot.
testNamestringThe compiler-supplied test name used to name the snapshot.
Returns
- Task
A task that completes when the snapshot has been verified or updated.
ShouldMatchExchangesSnapshot(StubHttpMessageHandler, Action<StubHttpExchangeSnapshotOptions>, Action<SnapshotSettings>?, CancellationToken, string, string)
Configures exchange options and optional snapshot settings inline.
public static Task ShouldMatchExchangesSnapshot(this StubHttpMessageHandler handler, Action<StubHttpExchangeSnapshotOptions> configureExchange, Action<SnapshotSettings>? configureSnapshot = null, CancellationToken cancellationToken = default, string sourceFile = "", string testName = "")
Parameters
handlerStubHttpMessageHandlerThe handler whose captured exchanges are snapshotted.
configureExchangeAction<StubHttpExchangeSnapshotOptions>A callback that configures exchange snapshot options.
configureSnapshotAction<SnapshotSettings>An optional callback that configures independent effective snapshot settings.
cancellationTokenCancellationTokenA token that cancels snapshot locking and file operations.
sourceFilestringThe compiler-supplied source file used to locate the snapshot.
testNamestringThe compiler-supplied test name used to name the snapshot.
Returns
- Task
A task that completes when the snapshot has been verified or updated.
ShouldMatchRequestSnapshot(StubHttpRequest, Action<SnapshotSettings>, CancellationToken, string, string)
Configures snapshot settings inline and asserts one captured request.
public static Task ShouldMatchRequestSnapshot(this StubHttpRequest request, Action<SnapshotSettings> configureSnapshot, CancellationToken cancellationToken = default, string sourceFile = "", string testName = "")
Parameters
requestStubHttpRequestThe captured request to snapshot.
configureSnapshotAction<SnapshotSettings>A callback that configures independent effective snapshot settings.
cancellationTokenCancellationTokenA token that cancels snapshot locking and file operations.
sourceFilestringThe compiler-supplied source file used to locate the snapshot.
testNamestringThe compiler-supplied test name used to name the snapshot.
Returns
- Task
A task that completes when the snapshot has been verified or updated.
ShouldMatchRequestSnapshot(StubHttpRequest, Action<StubHttpRequestSnapshotOptions>, Action<SnapshotSettings>?, CancellationToken, string, string)
Configures request options and optional snapshot settings inline.
public static Task ShouldMatchRequestSnapshot(this StubHttpRequest request, Action<StubHttpRequestSnapshotOptions> configureRequest, Action<SnapshotSettings>? configureSnapshot = null, CancellationToken cancellationToken = default, string sourceFile = "", string testName = "")
Parameters
requestStubHttpRequestThe captured request to snapshot.
configureRequestAction<StubHttpRequestSnapshotOptions>A callback that configures request snapshot options.
configureSnapshotAction<SnapshotSettings>An optional callback that configures independent effective snapshot settings.
cancellationTokenCancellationTokenA token that cancels snapshot locking and file operations.
sourceFilestringThe compiler-supplied source file used to locate the snapshot.
testNamestringThe compiler-supplied test name used to name the snapshot.
Returns
- Task
A task that completes when the snapshot has been verified or updated.
ShouldMatchRequestsSnapshot(StubHttpMessageHandler, Action<SnapshotSettings>, CancellationToken, string, string)
Configures snapshot settings inline and asserts all captured requests.
public static Task ShouldMatchRequestsSnapshot(this StubHttpMessageHandler handler, Action<SnapshotSettings> configureSnapshot, CancellationToken cancellationToken = default, string sourceFile = "", string testName = "")
Parameters
handlerStubHttpMessageHandlerThe handler whose captured requests are snapshotted.
configureSnapshotAction<SnapshotSettings>A callback that configures independent effective snapshot settings.
cancellationTokenCancellationTokenA token that cancels snapshot locking and file operations.
sourceFilestringThe compiler-supplied source file used to locate the snapshot.
testNamestringThe compiler-supplied test name used to name the snapshot.
Returns
- Task
A task that completes when the snapshot has been verified or updated.
ShouldMatchRequestsSnapshot(StubHttpMessageHandler, Action<StubHttpRequestSnapshotOptions>, Action<SnapshotSettings>?, CancellationToken, string, string)
Configures request options and optional snapshot settings inline.
public static Task ShouldMatchRequestsSnapshot(this StubHttpMessageHandler handler, Action<StubHttpRequestSnapshotOptions> configureRequest, Action<SnapshotSettings>? configureSnapshot = null, CancellationToken cancellationToken = default, string sourceFile = "", string testName = "")
Parameters
handlerStubHttpMessageHandlerThe handler whose captured requests are snapshotted.
configureRequestAction<StubHttpRequestSnapshotOptions>A callback that configures request snapshot options.
configureSnapshotAction<SnapshotSettings>An optional callback that configures independent effective snapshot settings.
cancellationTokenCancellationTokenA token that cancels snapshot locking and file operations.
sourceFilestringThe compiler-supplied source file used to locate the snapshot.
testNamestringThe compiler-supplied test name used to name the snapshot.
Returns
- Task
A task that completes when the snapshot has been verified or updated.