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>, IDependencyContainerInheritance
-
BaseDependencyContainerBaseMockContainer<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
mockobject-
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
Returns
- Type
-
The resolution key type.