Table of Contents

Method FailTest

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

FailTest(IMessageBus, CancellationTokenSource, ITest, Exception)

Fail a test with the given exception.

public static RunSummary FailTest(IMessageBus messageBus, CancellationTokenSource cancellationTokenSource, ITest test, Exception exception)

Parameters

messageBus

The message bus to send the messages to

cancellationTokenSource CancellationTokenSource

The cancellation token source to cancel if requested

test

The test to fail

exception Exception

The exception to fail the test cases with

Returns