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

exchange StubHttpExchange

The captured exchange to snapshot.

configureSnapshot Action<SnapshotSettings>

A callback that configures independent effective snapshot settings.

cancellationToken CancellationToken

A token that cancels snapshot locking and file operations.

sourceFile string

The compiler-supplied source file used to locate the snapshot.

testName string

The 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

exchange StubHttpExchange

The captured exchange to snapshot.

configureExchange Action<StubHttpExchangeSnapshotOptions>

A callback that configures exchange snapshot options.

configureSnapshot Action<SnapshotSettings>

An optional callback that configures independent effective snapshot settings.

cancellationToken CancellationToken

A token that cancels snapshot locking and file operations.

sourceFile string

The compiler-supplied source file used to locate the snapshot.

testName string

The 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

handler StubHttpMessageHandler

The handler whose captured exchanges are snapshotted.

configureSnapshot Action<SnapshotSettings>

A callback that configures independent effective snapshot settings.

cancellationToken CancellationToken

A token that cancels snapshot locking and file operations.

sourceFile string

The compiler-supplied source file used to locate the snapshot.

testName string

The 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

handler StubHttpMessageHandler

The handler whose captured exchanges are snapshotted.

configureExchange Action<StubHttpExchangeSnapshotOptions>

A callback that configures exchange snapshot options.

configureSnapshot Action<SnapshotSettings>

An optional callback that configures independent effective snapshot settings.

cancellationToken CancellationToken

A token that cancels snapshot locking and file operations.

sourceFile string

The compiler-supplied source file used to locate the snapshot.

testName string

The 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

request StubHttpRequest

The captured request to snapshot.

configureSnapshot Action<SnapshotSettings>

A callback that configures independent effective snapshot settings.

cancellationToken CancellationToken

A token that cancels snapshot locking and file operations.

sourceFile string

The compiler-supplied source file used to locate the snapshot.

testName string

The 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

request StubHttpRequest

The captured request to snapshot.

configureRequest Action<StubHttpRequestSnapshotOptions>

A callback that configures request snapshot options.

configureSnapshot Action<SnapshotSettings>

An optional callback that configures independent effective snapshot settings.

cancellationToken CancellationToken

A token that cancels snapshot locking and file operations.

sourceFile string

The compiler-supplied source file used to locate the snapshot.

testName string

The 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

handler StubHttpMessageHandler

The handler whose captured requests are snapshotted.

configureSnapshot Action<SnapshotSettings>

A callback that configures independent effective snapshot settings.

cancellationToken CancellationToken

A token that cancels snapshot locking and file operations.

sourceFile string

The compiler-supplied source file used to locate the snapshot.

testName string

The 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

handler StubHttpMessageHandler

The handler whose captured requests are snapshotted.

configureRequest Action<StubHttpRequestSnapshotOptions>

A callback that configures request snapshot options.

configureSnapshot Action<SnapshotSettings>

An optional callback that configures independent effective snapshot settings.

cancellationToken CancellationToken

A token that cancels snapshot locking and file operations.

sourceFile string

The compiler-supplied source file used to locate the snapshot.

testName string

The compiler-supplied test name used to name the snapshot.

Returns

Task

A task that completes when the snapshot has been verified or updated.