Table of Contents

Class XunitTestMethodRunner

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

The test method runner for xUnit.net v3 tests.

public class XunitTestMethodRunner : XunitTestMethodRunnerBase<XunitTestMethodRunnerContext, IXunitTestMethod, IXunitTestCase>
Inheritance
XunitTestMethodRunner
Inherited Members

Constructors

XunitTestMethodRunner()

Initializes a new instance of the XunitTestMethodRunner class.

protected XunitTestMethodRunner()

Properties

Instance

Gets the singleton instance of the XunitTestMethodRunner class.

public static XunitTestMethodRunner Instance { get; }

Property Value

XunitTestMethodRunner

Methods

Run(IXunitTestMethod, IReadOnlyCollection<IXunitTestCase>, ExplicitOption, IMessageBus, ExceptionAggregator, CancellationTokenSource, object?[])

Runs the test test method.

public ValueTask<RunSummary> Run(IXunitTestMethod testMethod, IReadOnlyCollection<IXunitTestCase> testCases, ExplicitOption explicitOption, IMessageBus messageBus, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource, object?[] constructorArguments)

Parameters

testMethod IXunitTestMethod

The test method to be run.

testCases IReadOnlyCollection<IXunitTestCase>

The test cases to be run. Cannot be empty.

explicitOption ExplicitOption

A flag to indicate how explicit tests should be treated.

messageBus IMessageBus

The message bus to report run status to.

aggregator ExceptionAggregator

The exception aggregator used to run code and collect exceptions.

cancellationTokenSource CancellationTokenSource

The task cancellation token source, used to cancel the test run.

constructorArguments object[]

The constructor arguments for the test class.

Returns

ValueTask<RunSummary>