Table of Contents

Class XunitTestCaseRunnerBaseContext<TTestCase, TTest>

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll
public class XunitTestCaseRunnerBaseContext<TTestCase, TTest> : TestCaseRunnerContext<TTestCase, TTest>, IAsyncLifetime, IAsyncDisposable where TTestCase : class, IXunitTestCase where TTest : class, IXunitTest

Type Parameters

TTestCase
TTest
Inheritance
TestCaseRunnerContext<TTestCase, TTest>
XunitTestCaseRunnerBaseContext<TTestCase, TTest>
Implements
Derived
Inherited Members

Constructors

XunitTestCaseRunnerBaseContext(TTestCase, IReadOnlyCollection<TTest>, IMessageBus, ExceptionAggregator, CancellationTokenSource, string, string?, ExplicitOption, object?[])

public XunitTestCaseRunnerBaseContext(TTestCase testCase, IReadOnlyCollection<TTest> tests, IMessageBus messageBus, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource, string displayName, string? skipReason, ExplicitOption explicitOption, object?[] constructorArguments)

Parameters

testCase TTestCase

The test case

tests IReadOnlyCollection<TTest>

The tests for the test case

messageBus IMessageBus

The message bus to send execution messages to

aggregator ExceptionAggregator

The exception aggregator

cancellationTokenSource CancellationTokenSource

The cancellation token source

displayName string

The display name of the test case

skipReason string

The skip reason, if the test case is being skipped

explicitOption ExplicitOption

The user's choice on how to treat explicit tests

constructorArguments object[]

The constructor arguments for the test class

Properties

BeforeAfterTestAttributes

Gets the list of IBeforeAfterTestAttribute instances for this test case.

public IReadOnlyCollection<IBeforeAfterTestAttribute> BeforeAfterTestAttributes { get; }

Property Value

IReadOnlyCollection<IBeforeAfterTestAttribute>

ConstructorArguments

Gets the arguments to pass to the constructor of the test class when creating it.

public object?[] ConstructorArguments { get; }

Property Value

object[]

DisplayName

Gets the display name of the test case.

public string DisplayName { get; }

Property Value

string

SkipReason

Gets the statically specified skip reason for the test. Note that this only covers values passed via Skip, and not dynamically skipped tests.

public string? SkipReason { get; }

Property Value

string

Tests

Gets the tests for the given test case.

public override IReadOnlyCollection<TTest> Tests { get; }

Property Value

IReadOnlyCollection<TTest>