Class ProtoHostBuilderExtensions
Registers fake HTTP services the suite stubs per test.
public static class ProtoHostBuilderExtensions
- Inheritance
-
ProtoHostBuilderExtensions
- Inherited Members
Methods
AddWireMock(IProtoHostBuilder, string, Action<ProtoWireMockBuilder>?)
Adds a fake HTTP service the tests stub: Proto.Context.WireMock(name) starts its server
on first use, stubs read like the scenario, matched requests are traced with the REST response
shape, and registered stubs contribute coverage. A repeated name with equal settings composes;
a repeated name with different settings throws naming the fake.
public static IProtoHostBuilder AddWireMock(this IProtoHostBuilder builder, string name = "Default", Action<ProtoWireMockBuilder>? configure = null)
Parameters
builderIProtoHostBuilderThe IProtoHostBuilder instance.
namestringThe fake's name, in accessors, capabilities and diagnostics. Defaults to "Default".
configureAction<ProtoWireMockBuilder>The fake's lifetime and port; per-test on a dynamic port by default.