Table of Contents

Class XunitTestRunnerBaseContext<TTest>

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

Context class for XunitTestRunner.

public class XunitTestRunnerBaseContext<TTest> : TestRunnerContext<TTest>, IAsyncLifetime, IAsyncDisposable where TTest : class, IXunitTest

Type Parameters

TTest
Inheritance
XunitTestRunnerBaseContext<TTest>
Implements
Derived
Inherited Members
TestRunnerContext<TTest>.TestMethod
TestRunnerContext<TTest>.TestMethodArguments
TestRunnerBaseContext<TTest>.Test

Constructors

XunitTestRunnerBaseContext(TTest, IMessageBus, ExplicitOption, ExceptionAggregator, CancellationTokenSource, IReadOnlyCollection<IBeforeAfterTestAttribute>, object?[])

Initializes a new instance of the XunitTestRunnerBaseContext<TTest> class.

Properties

BeforeAfterTestAttributes

Gets the collection of IBeforeAfterTestAttribute used for this test.

ConstructorArguments

Gets the arguments that should be passed to the test class when it's constructed.

Methods

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.

RunAfterAttributes()

Runs the After(MethodInfo, IXunitTest) side of the before after attributes.

RunBeforeAttributes()

Runs the Before(MethodInfo, IXunitTest) side of the before after attributes.