Class RangeAttribute
Supplies a range of values to an individual parameter of a parameterized test.
Implements
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true, Inherited = false)]
public class RangeAttribute : NUnitAttribute, IParameterDataSource
Constructors
View SourceRangeAttribute(double, double, double)
Constructs a range of double values with the specified step size.
Declaration
public RangeAttribute(double from, double to, double step)
Parameters
Type | Name | Description |
---|---|---|
double | from | |
double | to | |
double | step |
RangeAttribute(int, int)
Constructs a range of int values using the default step of 1.
Declaration
public RangeAttribute(int from, int to)
Parameters
Type | Name | Description |
---|---|---|
int | from | |
int | to |
RangeAttribute(int, int, int)
Constructs a range of int values with the specified step size.
Declaration
public RangeAttribute(int from, int to, int step)
Parameters
Type | Name | Description |
---|---|---|
int | from | |
int | to | |
int | step |
RangeAttribute(long, long)
Constructs a range of long values using a default step of 1.
Declaration
public RangeAttribute(long from, long to)
Parameters
Type | Name | Description |
---|---|---|
long | from | |
long | to |
RangeAttribute(long, long, long)
Constructs a range of long values with the specified step size.
Declaration
public RangeAttribute(long from, long to, long step)
Parameters
Type | Name | Description |
---|---|---|
long | from | |
long | to | |
long | step |
RangeAttribute(float, float, float)
Constructs a range of float values with the specified step size.
Declaration
public RangeAttribute(float from, float to, float step)
Parameters
Type | Name | Description |
---|---|---|
float | from | |
float | to | |
float | step |
RangeAttribute(uint, uint)
Constructs a range of uint values using the default step of 1.
Declaration
[CLSCompliant(false)]
public RangeAttribute(uint from, uint to)
Parameters
Type | Name | Description |
---|---|---|
uint | from | |
uint | to |
RangeAttribute(uint, uint, uint)
Constructs a range of uint values with the specified step size.
Declaration
[CLSCompliant(false)]
public RangeAttribute(uint from, uint to, uint step)
Parameters
Type | Name | Description |
---|---|---|
uint | from | |
uint | to | |
uint | step |
RangeAttribute(ulong, ulong)
Constructs a range of ulong values using the default step of 1.
Declaration
[CLSCompliant(false)]
public RangeAttribute(ulong from, ulong to)
Parameters
Type | Name | Description |
---|---|---|
ulong | from | |
ulong | to |
RangeAttribute(ulong, ulong, ulong)
Constructs a range of ulong values with the specified step size.
Declaration
[CLSCompliant(false)]
public RangeAttribute(ulong from, ulong to, ulong step)
Parameters
Type | Name | Description |
---|---|---|
ulong | from | |
ulong | to | |
ulong | step |
Methods
View SourceGetData(IParameterInfo)
Retrieves a list of arguments which can be passed to the specified parameter.
Declaration
public IEnumerable GetData(IParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
IParameterInfo | parameter | The parameter of a parameterized test. |
Returns
Type | Description |
---|---|
IEnumerable |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |