Class TestRunnerContext<TTest>
Base context class for TestRunner<TContext, TTest>. This includes an assumption that a test means invoking a method on a class.
public class TestRunnerContext<TTest> : TestRunnerBaseContext<TTest>, IAsyncLifetime, IAsyncDisposable where TTest : class, ITest
Type Parameters
TTest
- Inheritance
-
TestRunnerBaseContext<TTest>TestRunnerContext<TTest>
- Implements
- Derived
- Inherited Members
Constructors
TestRunnerContext(TTest, IMessageBus, string?, ExplicitOption, ExceptionAggregator, CancellationTokenSource, MethodInfo, object?[])
Base context class for TestRunner<TContext, TTest>. This includes an assumption that a test means invoking a method on a class.
public TestRunnerContext(TTest test, IMessageBus messageBus, string? skipReason, ExplicitOption explicitOption, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource, MethodInfo testMethod, object?[] testMethodArguments)
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
testMethodMethodInfoThe test method
testMethodArgumentsobject[]The method arguments for the test method
Properties
TestMethod
Gets the method that this test originated in.
public MethodInfo TestMethod { get; }
Property Value
TestMethodArguments
Gets the arguments to be passed to the test method during invocation.
public object?[] TestMethodArguments { get; }
Property Value
- object[]