Table of Contents

Namespace Mokkit.Containers.Common

Classes

BaseMockContainer<TMock>

Base implementation of a mock container shared by the framework-specific adapters (Moq, NSubstitute, FakeItEasy). It materializes one mock per registration per scope, exposes them for direct resolution, and deposits the injectable object into the shared Mokkit.Suite.TestHostBag so sibling DI containers can wire them into the real graph. Adapters supply the two framework-specific hooks: how a mock is keyed for resolution and how its injectable object is obtained.

BaseMockContainerBuilder<TMock>

Base builder for mock containers, implementing the multi-phase lifecycle (PreInit → Init → PreBuild → Build) and the shared Mokkit.Containers.Common.MockCollection`1. Concrete adapters expose framework-named fluent configuration methods (via Mokkit.Containers.Common.BaseMockContainerBuilder`1.SetPreInit(System.Func{Mokkit.Containers.Common.IMockCollection{`0},System.Threading.Tasks.Task})/Mokkit.Containers.Common.BaseMockContainerBuilder`1.SetInit(System.Func{Mokkit.Containers.Common.IMockCollection{`0},System.Threading.Tasks.Task})/Mokkit.Containers.Common.BaseMockContainerBuilder`1.AddPreBuild``1(System.Func{Mokkit.Containers.Common.IMockCollection{`0},``0,System.Threading.Tasks.Task})) and implement Mokkit.Containers.Common.BaseMockContainerBuilder`1.CreateContainer(Mokkit.Containers.Common.IMockCollection{`0},Mokkit.Suite.ITestHostBagAccessor).

MockCollection<TMock>

Represents a concrete implementation of Mokkit.Containers.Common.IMockCollection`1 that manages a collection of mock registrations. This class provides list functionality while adding mock-specific registration methods with validation and fluent API support.

MockRegistration<TMock>

Represents a registration entry for a mock object, containing the type information and factory function. This class encapsulates the metadata and creation logic for a specific mock registration.

Interfaces

IMockCollection<TMock>

Represents a collection of mock registrations that provides fluent registration methods for mock objects. This interface extends System.Collections.Generic.IList`1 to provide list functionality while adding mock-specific registration methods.