Show / Hide Table of Contents

    Class TestingServiceHostBuilderExtensions

    extensions.

    Inheritance
    System.Object
    TestingServiceHostBuilderExtensions
    Namespace: Copper.Service
    Assembly: Copper.Testing.dll
    Syntax
    public static class TestingServiceHostBuilderExtensions

    Methods

    View Source

    UseServiceMock<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 for chaining.

    Type Parameters
    Name Description
    TServiceHostBuilder

    The service host builder type.

    • View Source
    In This Article
    • Methods
      • UseServiceMock<TServiceHostBuilder>(TServiceHostBuilder, Type, Object)
    Back to top Generated by DocFX