Table of Contents

Class CombinatorialDataAttribute

Namespace
Xunit
Assembly
Xunit.Combinatorial.dll

Provides a test method decorated with a Xunit.TheoryAttribute with arguments to run every possible combination of values for the parameters taken by the test method.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class CombinatorialDataAttribute : DataAttribute, _Attribute, IDataAttribute
Inheritance
DataAttribute
CombinatorialDataAttribute
Implements
IDataAttribute
Inherited Members
DataAttribute.Explicit
DataAttribute.ExplicitAsNullable
DataAttribute.Skip
DataAttribute.TestDisplayName
DataAttribute.Timeout
DataAttribute.TimeoutAsNullable
DataAttribute.Traits

Constructors

CombinatorialDataAttribute()

Initializes a new instance of the CombinatorialDataAttribute class.

public CombinatorialDataAttribute()

Methods

GetData(MethodInfo, DisposalTracker)

Returns the data to be used to test the theory.

public override ValueTask<IReadOnlyCollection<ITheoryDataRow>> GetData(MethodInfo testMethod, DisposalTracker disposalTracker)

Parameters

testMethod MethodInfo

The test method the data attribute is attached to

disposalTracker DisposalTracker

The disposal tracker used to dispose the data

Returns

ValueTask<IReadOnlyCollection<ITheoryDataRow>>

SupportsDiscoveryEnumeration()

Returns true if the data attribute supports enumeration during discovery; false otherwise. Data attributes with expensive computational costs and/or randomized data sets should return false.

public override bool SupportsDiscoveryEnumeration()

Returns

bool