Class BowireMockApplicationBuilderExtensions

Namespace
Kuestenlogik.Bowire.Mock
Assembly
Kuestenlogik.Bowire.Mock.dll

ASP.NET pipeline extensions for mounting a Bowire mock replay handler. Intended for test fixtures and any scenario where the mock coexists with the real service on the same host.

public static class BowireMockApplicationBuilderExtensions
Inheritance
BowireMockApplicationBuilderExtensions
Inherited Members

Methods

UseBowireMock(IApplicationBuilder, BowireRecording, Action<MockOptions>?)

Mount the mock handler with an already-loaded recording. Primarily for tests that build a recording in-memory.

public static IApplicationBuilder UseBowireMock(this IApplicationBuilder app, BowireRecording recording, Action<MockOptions>? configure = null)

Parameters

app IApplicationBuilder
recording BowireRecording
configure Action<MockOptions>

Returns

IApplicationBuilder

UseBowireMock(IApplicationBuilder, string, Action<MockOptions>?)

Mount the mock handler, loading the recording from disk.

public static IApplicationBuilder UseBowireMock(this IApplicationBuilder app, string recordingPath, Action<MockOptions>? configure = null)

Parameters

app IApplicationBuilder

The ASP.NET application pipeline.

recordingPath string

Absolute or relative path to a recording JSON file.

configure Action<MockOptions>

Optional callback to tune the MockOptions.

Returns

IApplicationBuilder