Table of Contents

Class RandomAttribute

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

RandomAttribute is used to supply a set of random _values to a single parameter of a parameterized test.

public class RandomAttribute : ValuesAttribute, IParameterDataSource
Inheritance
RandomAttribute
Implements
Inherited Members

Constructors

RandomAttribute(double, double, int)

Construct a set of doubles from min to max

public RandomAttribute(double min, double max, int count)

Parameters

min double
max double
count int

RandomAttribute(int)

Construct a set of Enums if the type is an Enum otherwise Construct a set of doubles from 0.0 to 1.0, specifying only the count.

public RandomAttribute(int count)

Parameters

count int

RandomAttribute(int, int, int)

Construct a set of ints from min to max

public RandomAttribute(int min, int max, int count)

Parameters

min int
max int
count int

Methods

GetData(ParameterInfo)

Get the collection of _values to be used as arguments

public IEnumerable GetData(ParameterInfo parameter)

Parameters

parameter ParameterInfo

Returns

IEnumerable