Class RandomAttribute
Supplies a set of random values to a single parameter of a parameterized test.
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
public class RandomAttribute : NUnitAttribute, IParameterDataSource
- Inheritance
-
RandomAttribute
- Implements
- Inherited Members
Constructors
RandomAttribute(byte, byte, int)
Generates byte values within a specified range.
public RandomAttribute(byte min, byte max, int count)
Parameters
RandomAttribute(double, double, int)
Generates double values within a specified range.
public RandomAttribute(double min, double max, int count)
Parameters
RandomAttribute(short, short, int)
Generates short values within a specified range.
public RandomAttribute(short min, short max, int count)
Parameters
RandomAttribute(int)
Construct a random set of values appropriate for the Type of the parameter on which the attribute appears, specifying only the count.
public RandomAttribute(int count)
Parameters
count
int
RandomAttribute(int, int, int)
Generates int values within a specified range.
public RandomAttribute(int min, int max, int count)
Parameters
RandomAttribute(long, long, int)
Generates long values within a specified range.
public RandomAttribute(long min, long max, int count)
Parameters
RandomAttribute(sbyte, sbyte, int)
Generates sbyte values within a specified range.
[CLSCompliant(false)]
public RandomAttribute(sbyte min, sbyte max, int count)
Parameters
RandomAttribute(float, float, int)
Generates float values within a specified range.
public RandomAttribute(float min, float max, int count)
Parameters
RandomAttribute(ushort, ushort, int)
Generates ushort values within a specified range.
[CLSCompliant(false)]
public RandomAttribute(ushort min, ushort max, int count)
Parameters
RandomAttribute(uint, uint, int)
Generates uint values within a specified range.
[CLSCompliant(false)]
public RandomAttribute(uint min, uint max, int count)
Parameters
RandomAttribute(ulong, ulong, int)
Generates ulong values within a specified range.
[CLSCompliant(false)]
public RandomAttribute(ulong min, ulong max, int count)
Parameters
Properties
Distinct
If true, no value will be repeated.
public bool Distinct { get; set; }
Property Value
Methods
GetData(IParameterInfo)
Retrieves a list of arguments which can be passed to the specified parameter.
public IEnumerable GetData(IParameterInfo parameter)
Parameters
parameter
IParameterInfoThe parameter of a parameterized test.