Table of Contents

Method RunXunitTestCase

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

RunXunitTestCase(IXunitTestCase, IMessageBus, CancellationTokenSource, ExceptionAggregator, ExplicitOption, object?[])

Runs a single test case (which implements IXunitTestCase) using the XunitTestCaseRunner after enumerating all tests.

public static ValueTask<RunSummary> RunXunitTestCase(IXunitTestCase testCase, IMessageBus messageBus, CancellationTokenSource cancellationTokenSource, ExceptionAggregator aggregator, ExplicitOption explicitOption, object?[] constructorArguments)

Parameters

testCase

The test case to run

messageBus

The message bus to send the messages to

cancellationTokenSource CancellationTokenSource

The cancellation token source to cancel if requested

aggregator

The exception aggregator to record exceptions to

explicitOption

A flag to indicate which types of tests to run (non-explicit, explicit, or both)

constructorArguments object[]

The arguments to pass to the test class constructor

Returns

ValueTask<RunSummary>