Class TestStage
- Namespace
- Mokkit.Suite
- Assembly
- Mokkit.dll
Represents a test stage that provides the primary entry point for AAA (Arrange-Act-Assert) test operations. This class extends Mokkit.Suite.TestHost to provide convenient factory methods for starting arrange and inspect chains.
public class TestStage : TestHost, ITestHost, IDisposableInheritance
Implements
Inherited Members
Constructors
TestStage(IEnumerable<IDependencyContainer>, ITestHostBagAccessor, Guid)
Initializes a new instance of the Mokkit.Suite.TestStage class with the specified containers, bag accessor, and stage identifier.
public TestStage(IEnumerable<IDependencyContainer> containers, ITestHostBagAccessor bagAccessor, Guid stageId)Parameters
containersIEnumerable<IDependencyContainer>-
The collection of dependency injection containers to use for service resolution.
bagAccessorITestHostBagAccessor-
The test host bag accessor for accessing shared test resources.
stageIdGuid-
The unique identifier for this test stage.
Methods
Act()
Starts a new act operation chain for performing the operation(s) under test. This method provides the entry point for the Act phase of the AAA pattern. Like Arrange, an act may produce artifacts (through captures or a returned result) that later Inspect steps observe.
public ITestAct Act()Returns
- ITestAct
-
A new Mokkit.Act.ITestAct instance for chaining act operations.
Arrange()
Starts a new arrange operation chain for setting up test dependencies and state. This method provides the entry point for the Arrange phase of the AAA pattern.
public ITestArrange Arrange()Returns
- ITestArrange
-
A new Mokkit.Arrange.ITestArrange instance for chaining arrange operations.
Inspect()
Starts a new inspect operation chain for performing assertions and verifications. This method provides the entry point for the Assert phase of the AAA pattern.
public ITestInspect Inspect()Returns
- ITestInspect
-
A new Mokkit.Inspect.ITestInspect instance for chaining inspect operations.