Class TestAct
- Namespace
- Mokkit.Act
- Assembly
- Mokkit.dll
Internal implementation of Mokkit.Act.ITestAct that manages the execution of act functions in the AAA pattern. This class collects and executes act functions sequentially during the test act phase.
public class TestAct : ITestActInheritance
Implements
Inherited Members
Methods
GetAwaiter()
Gets an awaiter for the act instance.
public ITestActAwaiter GetAwaiter()Returns
- ITestActAwaiter
-
The awaiter for the act instance.
Returning<T>(Func<ITestHost, Task<T>>)
Turns the pending act steps into a result-bearing act by appending a producer that yields a value.
public ITestAct<T> Returning<T>(Func<ITestHost, Task<T>> producerFn)Parameters
producerFnFunc<ITestHost, Task<T>>-
The asynchronous function that performs the operation and returns its result.
Returns
- ITestAct<T>
-
A Mokkit.Act.TestAct`1 that runs the pending steps then the producer.
Type Parameters
T-
The type of the produced result.
Returning<T>(Func<ITestHost, T>)
Turns the pending act steps into a result-bearing act by appending a synchronous producer.
public ITestAct<T> Returning<T>(Func<ITestHost, T> producerFn)Parameters
producerFnFunc<ITestHost, T>-
The synchronous function that performs the operation and returns its result.
Returns
- ITestAct<T>
-
A Mokkit.Act.TestAct`1 that runs the pending steps then the producer.
Type Parameters
T-
The type of the produced result.
Then(ActAsyncFn)
Adds an act function to the act instance.
public ITestAct Then(ActAsyncFn actFn)Parameters
actFnActAsyncFn-
The act function to add to the act instance.
Returns
- ITestAct
-
The act instance for method chaining.
Then(ActFn)
Adds an act function to the act instance.
public ITestAct Then(ActFn actFn)Parameters
actFnActFn-
The act function to add to the act instance.
Returns
- ITestAct
-
The act instance for method chaining.