Table of Contents

Interface ITheoryDataRow

Namespace
Xunit
Assembly
xunit.v3.core.dll

Represents a single row of theory data, along with optional metadata attached to the row.

public interface ITheoryDataRow

Properties

Explicit

Gets a flag that indicates that the data row should only be run explicitly. If the value is null, then it inherits its explicitness from the value of Explicit.

bool? Explicit { get; }

Property Value

bool?

Skip

Gets the reason for skipping this row of data; if null is returned, then the data row isn't skipped.

string? Skip { get; }

Property Value

string

TestDisplayName

Gets the display name for the test (replacing the default behavior, which would be to use TestDisplayName or DisplayName, or falling back to the default test display name based on TestMethodDisplay and TestMethodDisplayOptions in the configuration file).

string? TestDisplayName { get; }

Property Value

string

Timeout

A value greater than zero marks the test as having a timeout, and gets or sets the timeout (in milliseconds). A non-null value here overrides any inherited value from the IDataAttribute or the ITheoryAttribute.

int? Timeout { get; }

Property Value

int?

Remarks

WARNING: Using this with parallelization turned on will result in undefined behavior. Timeout is only supported when parallelization is disabled, either globally or with a parallelization-disabled test collection.

Traits

Gets the trait values associated with this theory data row. If there are none, you may either return a null or empty dictionary.

Dictionary<string, HashSet<string>>? Traits { get; }

Property Value

Dictionary<string, HashSet<string>>

Methods

GetData()

Gets the theory data.

object?[] GetData()

Returns

object[]