Class TestMethodRunnerContext<TTestMethod, TTestCase>
Base context class for TestMethodRunner<TContext, TTestMethod, TTestCase>.
public class TestMethodRunnerContext<TTestMethod, TTestCase> : ContextBase, IAsyncLifetime, IAsyncDisposable where TTestMethod : class, ITestMethod where TTestCase : class, ITestCase
Type Parameters
TTestMethodThe type of the test method used by the test framework. Must derive from ITestMethod.
TTestCaseThe type of the test case used by the test framework. Must derive from ITestCase.
- Inheritance
-
TestMethodRunnerContext<TTestMethod, TTestCase>
- Implements
- Derived
- Inherited Members
Constructors
TestMethodRunnerContext(TTestMethod, IReadOnlyCollection<TTestCase>, ExplicitOption, IMessageBus, ExceptionAggregator, CancellationTokenSource)
Base context class for TestMethodRunner<TContext, TTestMethod, TTestCase>.
public TestMethodRunnerContext(TTestMethod testMethod, IReadOnlyCollection<TTestCase> testCases, ExplicitOption explicitOption, IMessageBus messageBus, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
Parameters
testMethodTTestMethodThe test method
testCasesIReadOnlyCollection<TTestCase>The test cases from the test method
explicitOptionExplicitOptionThe user's choice on how to treat explicit tests
messageBusIMessageBusThe message bus to send execution messages to
aggregatorExceptionAggregatorThe exception aggregator
cancellationTokenSourceCancellationTokenSourceThe cancellation token source
Properties
TestCases
Gets the test cases that are derived from this test method.
public IReadOnlyCollection<TTestCase> TestCases { get; }
Property Value
- IReadOnlyCollection<TTestCase>
TestMethod
Gets the test method that is being executed.
public TTestMethod TestMethod { get; }
Property Value
- TTestMethod