Table of Contents

Constructor XunitTest

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

XunitTest(IXunitTestCase, IXunitTestMethod, bool?, string?, string, int, IReadOnlyDictionary<string, IReadOnlyCollection<string>>, int?, object?[])

Initializes a new instance of the XunitTest class.

public XunitTest(IXunitTestCase testCase, IXunitTestMethod testMethod, bool? @explicit, string? skipReason, string testDisplayName, int testIndex, IReadOnlyDictionary<string, IReadOnlyCollection<string>> traits, int? timeout, object?[] testMethodArguments)

Parameters

testCase

The test case this test belongs to.

testMethod

The test method to be run; may differ from the test method embedded into the test case

explicit bool?

A flag to indicate the test was marked as explicit; if not set, will fall back to the test case

skipReason string

The skip reason for this test.

testDisplayName string

The display name for this test.

testIndex int

The index of this test inside the test case. Used for computing UniqueID.

traits IReadOnlyDictionary<string, IReadOnlyCollection<string>>

The traits for the given test.

timeout int?

The timeout for the test; if not set, will fall back to the test case

testMethodArguments object[]

The arguments to be passed to the test method

XunitTest(IXunitTestCase, IXunitTestMethod, bool?, string?, string, string, IReadOnlyDictionary<string, IReadOnlyCollection<string>>?, int?, object?[]?)

This constructor is for testing purposes only. Do not use in production code.

public XunitTest(IXunitTestCase testCase, IXunitTestMethod testMethod, bool? @explicit, string? skipReason, string testDisplayName, string uniqueID, IReadOnlyDictionary<string, IReadOnlyCollection<string>>? traits = null, int? timeout = null, object?[]? testMethodArguments = null)

Parameters

testCase
testMethod
explicit bool?
skipReason string
testDisplayName string
uniqueID string
traits IReadOnlyDictionary<string, IReadOnlyCollection<string>>
timeout int?
testMethodArguments object[]