Table of Contents

Class PairwiseDataAttribute

Namespace
Xunit
Assembly
Xunit.Combinatorial.dll

Provides a test method decorated with a Xunit.TheoryAttribute with arguments to run various combination of values for the parameters taken by the test method using a pairwise strategy.

public class PairwiseDataAttribute : DataAttribute, _Attribute, IDataAttribute
Inheritance
DataAttribute
PairwiseDataAttribute
Implements
IDataAttribute
Inherited Members
DataAttribute.Explicit
DataAttribute.ExplicitAsNullable
DataAttribute.Skip
DataAttribute.TestDisplayName
DataAttribute.Timeout
DataAttribute.TimeoutAsNullable
DataAttribute.Traits

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