Class TestingServiceHostBuilderExtensions
Inheritance
System.Object
TestingServiceHostBuilderExtensions
Namespace: Copper.Service
Assembly: Copper.Testing.dll
Syntax
public static class TestingServiceHostBuilderExtensions
Methods
View SourceUseServiceMock<TServiceHostBuilder>(TServiceHostBuilder, Type, Object)
Replaces the configured service instance for a given service contract with a service mock.
Declaration
public static TServiceHostBuilder UseServiceMock<TServiceHostBuilder>(this TServiceHostBuilder serviceHostBuilder, Type contractType, object serviceMock)
where TServiceHostBuilder : ServiceHostBuilder<TServiceHostBuilder>
Parameters
Type | Name | Description |
---|---|---|
TServiceHostBuilder | serviceHostBuilder | The service host builder. |
System.Type | contractType | The contract type. |
System.Object | serviceMock | The service mock. |
Returns
Type | Description |
---|---|
TServiceHostBuilder | The same instance of |
Type Parameters
Name | Description |
---|---|
TServiceHostBuilder | The service host builder type. |