Table of Contents

Class TestClassRunnerContext<TTestClass, TTestCase>

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll
public class TestClassRunnerContext<TTestClass, TTestCase> : ContextBase, IAsyncLifetime, IAsyncDisposable where TTestClass : class, ITestClass where TTestCase : class, ITestCase

Type Parameters

TTestClass

The type of the test class used by the test framework. Must derive from ITestClass.

TTestCase

The type of the test case used by the test framework. Must derive from ITestCase.

Inheritance
TestClassRunnerContext<TTestClass, TTestCase>
Implements
Derived
Inherited Members

Constructors

TestClassRunnerContext(TTestClass, IReadOnlyCollection<TTestCase>, ExplicitOption, IMessageBus, ExceptionAggregator, CancellationTokenSource)

public TestClassRunnerContext(TTestClass testClass, IReadOnlyCollection<TTestCase> testCases, ExplicitOption explicitOption, IMessageBus messageBus, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)

Parameters

testClass TTestClass

The test class

testCases IReadOnlyCollection<TTestCase>

The test from the test class

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 associated with the test class.

public IReadOnlyCollection<TTestCase> TestCases { get; }

Property Value

IReadOnlyCollection<TTestCase>

TestClass

Gets the test class that is being executed.

public TTestClass TestClass { get; }

Property Value

TTestClass