Table of Contents

Class TestMethodRunnerContext<TTestMethod, TTestCase>

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll
public class TestMethodRunnerContext<TTestMethod, TTestCase> : ContextBase, IAsyncLifetime, IAsyncDisposable where TTestMethod : class, ITestMethod where TTestCase : class, ITestCase

Type Parameters

TTestMethod

The type of the test method used by the test framework. Must derive from ITestMethod.

TTestCase

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

public TestMethodRunnerContext(TTestMethod testMethod, IReadOnlyCollection<TTestCase> testCases, ExplicitOption explicitOption, IMessageBus messageBus, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)

Parameters

testMethod TTestMethod

The test method

testCases IReadOnlyCollection<TTestCase>

The test cases from the test method

explicitOption ExplicitOption

The user's choice on how to treat explicit tests

messageBus IMessageBus

The message bus to send execution messages to

aggregator ExceptionAggregator

The exception aggregator

cancellationTokenSource CancellationTokenSource

The 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