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 |
---|---|---|
TService |
serviceHostBuilder | The service host builder. |
System. |
contractType | The contract type. |
System. |
serviceMock | The service mock. |
Returns
Type | Description |
---|---|
TService |
The same instance of |
Type Parameters
Name | Description |
---|---|
TServiceHostBuilder | The service host builder type. |