Table of Contents

Method SkipTestCases

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

SkipTestCases(IMessageBus, CancellationTokenSource, IReadOnlyCollection<ITestCase>, string, bool, bool, bool, bool, bool)

Skips a set of test cases with the given skip reason.

public static RunSummary SkipTestCases(IMessageBus messageBus, CancellationTokenSource cancellationTokenSource, IReadOnlyCollection<ITestCase> testCases, string skipReason, bool sendTestCollectionMessages = false, bool sendTestClassMessages = false, bool sendTestMethodMessages = false, bool sendTestCaseMessages = true, bool sendTestMessages = true)

Parameters

messageBus

The message bus to send the messages to

cancellationTokenSource CancellationTokenSource

The cancellation token source to cancel if requested

testCases IReadOnlyCollection<ITestCase>

The test cases to fail

skipReason string

The skip reason

sendTestCollectionMessages bool

Set to true to send ITestCollectionStarting and ITestCollectionFinished messages; set to false to skip

sendTestClassMessages bool

Set to true to send ITestClassStarting and ITestClassFinished messages; set to false to skip

sendTestMethodMessages bool

Set to true to send ITestMethodStarting and ITestMethodFinished messages; set to false to skip

sendTestCaseMessages bool

Set to true to send ITestCaseStarting and ITestCaseFinished messages; set to false to skip

sendTestMessages bool

Set to true to send ITestStarting and ITestFinished messages; set to false to skip

Returns