Table of Contents

Method GetSkipReason

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

GetSkipReason(Exception?)

Gets the runtime skip reason for the test, inspecting the provided exception to see if it contractually matches a "dynamically skipped" exception (that is, any exception message that starts with Value). If the exception does not match the pattern, consults the base skip reason (from Skip), as well as SkipUnless and SkipWhen to determine if the test should be dynamically skipped.

public override string? GetSkipReason(Exception? exception)

Parameters

exception Exception

The exception to inspect

Returns

string

The skip reason, if the test is skipped; null, otherwise