Table of Contents

Method FailTest

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

FailTest(TContext, TTest, Exception)

Override this method to fail an individual test.

protected virtual ValueTask<RunSummary> FailTest(TContext ctxt, TTest test, Exception exception)

Parameters

ctxt TContext

The context that describes the current test case

test TTest

The test to be failed.

exception Exception

The exception that was caused during startup.

Returns

ValueTask<RunSummary>

Returns summary information about the test case run.

Remarks

By default, uses XunitRunnerHelper to fail the test cases.