Table of Contents

Class TestRunnerContext<TTest>

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

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
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

test TTest

The test

messageBus IMessageBus

The message bus to send execution messages to

skipReason string

The skip reason for the test, if it's being skipped

explicitOption ExplicitOption

The user's choice on how to treat explicit tests

aggregator ExceptionAggregator

The exception aggregator

cancellationTokenSource CancellationTokenSource

The cancellation token source

testMethod MethodInfo

The test method

testMethodArguments object[]

The method arguments for the test method

Properties

TestMethod

Gets the method that this test originated in.

public MethodInfo TestMethod { get; }

Property Value

MethodInfo

TestMethodArguments

Gets the arguments to be passed to the test method during invocation.

public object?[] TestMethodArguments { get; }

Property Value

object[]