Table of Contents

Class FakeItEasyContainer

Namespace
Mokkit.Containers.FakeItEasy
Assembly
Mokkit.Containers.FakeItEasy.dll

Mokkit container backed by FakeItEasy. A FakeItEasy fake is the object, so it is resolved by the mocked type and injected into the real graph as-is.

public class FakeItEasyContainer : BaseMockContainer<object>, IDependencyContainer

Inheritance

BaseDependencyContainer
BaseMockContainer<object>

Implements

IDependencyContainer

Inherited Members

BaseMockContainer<object>.GetResolveKey(object, Type)
BaseMockContainer<object>.GetInjectable(object)
BaseMockContainer<object>.BeginScope(TestHostContext)

Methods

GetInjectable(object)

Returns the object to inject into the real graph (deposited into the bag). For a wrapper-based framework this is the produced object (e.g. mock.Object); for a substitute-is-object framework this is the mock itself.

protected override object? GetInjectable(object mock)

Parameters

mock object

The materialized mock.

Returns

object?

The injectable object, or null.

GetResolveKey(object, Type)

Returns the type under which a materialized mock is resolved. For a wrapper-based framework this is the wrapper type (e.g. Mock<T>); for a framework whose substitute is the object itself this is the mocked type.

protected override Type GetResolveKey(object mock, Type innerType)

Parameters

mock object

The materialized mock.

innerType Type

The mocked type recorded at registration.

Returns

Type

The resolution key type.