Table of Contents

Class CombinatorialRandomDataAttribute

Namespace
Xunit
Assembly
Xunit.Combinatorial.dll

Specifies which range of values for this parameter should be used for running the test method.

[AttributeUsage(AttributeTargets.Parameter)]
public class CombinatorialRandomDataAttribute : Attribute, _Attribute, ICombinatorialValuesProvider
Inheritance
CombinatorialRandomDataAttribute
Implements
Inherited Members

Fields

NoSeed

Special seed value to create System.Random class without seed.

public const int NoSeed = 0

Field Value

int

Properties

Count

Gets or sets the number of values to generate. Must be positive.

public int Count { get; set; }

Property Value

int

The default value is 5.

Maximum

Gets or sets the maximum value (inclusive) that may be randomly generated.

public int Maximum { get; set; }

Property Value

int

The default value is MaxValue - 1, which is the maximum allowable value.

Minimum

Gets or sets the minimum value (inclusive) that may be randomly generated.

public int Minimum { get; set; }

Property Value

int

The default value is 0.

Seed

Gets or sets the seed to use for random number generation.

public int Seed { get; set; }

Property Value

int

The default value of NoSeed allows for a new seed to be used each time.

Methods

GetValues(ParameterInfo)

Gets the values that should be passed to this parameter on the test method.

public object[] GetValues(ParameterInfo parameter)

Parameters

parameter ParameterInfo

The parameter to get values for.

Returns

object[]

An array of values.