Class TestRunnerBaseContext<TTest>
Base context class for TestRunnerBase<TContext, TTest>.
public class TestRunnerBaseContext<TTest> : ContextBase, IAsyncLifetime, IAsyncDisposable where TTest : class, ITest
Type Parameters
TTest
- Inheritance
-
TestRunnerBaseContext<TTest>
- Implements
- Derived
- Inherited Members
Constructors
TestRunnerBaseContext(TTest, IMessageBus, string?, ExplicitOption, ExceptionAggregator, CancellationTokenSource)
Base context class for TestRunnerBase<TContext, TTest>.
public TestRunnerBaseContext(TTest test, IMessageBus messageBus, string? skipReason, ExplicitOption explicitOption, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
Parameters
testTTestThe test
messageBusIMessageBusThe message bus to send execution messages to
skipReasonstringThe skip reason for the test, if it's being skipped
explicitOptionExplicitOptionThe user's choice on how to treat explicit tests
aggregatorExceptionAggregatorThe exception aggregator
cancellationTokenSourceCancellationTokenSourceThe cancellation token source
Properties
Test
Gets the test that's being invoked.
public TTest Test { get; }
Property Value
- TTest
Methods
GetSkipReason(Exception?)
Gets the runtime skip reason for the test.
public virtual string? GetSkipReason(Exception? exception)
Parameters
exceptionExceptionThe exception that was thrown during test invocation
Returns
- string
The skip reason, if the test is skipped;
null, otherwise