Click or drag to resize

AutoMockGetFromRepository Method (MockRepository, ActionContainerBuilder)

Create new AutoMock instance that will create mocks with behavior defined by a repository.

Namespace:  Autofac.Extras.Moq
Assembly:  Autofac.Extras.Moq (in Autofac.Extras.Moq.dll) Version: 6.0.0+4195b730a1f4c2330f7a6e7642c9ad63581968b7
Syntax
public static AutoMock GetFromRepository(
	MockRepository repository,
	Action<ContainerBuilder> beforeBuild
)

Parameters

repository
Type: MockRepository
The repository that defines the behavior.
beforeBuild
Type: SystemActionContainerBuilder
Callback before container was created, you can add your own components here.

Return Value

Type: AutoMock
An AutoMock based on the provided MockRepository.
See Also