Table of Contents

Class RangeAttribute

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

Supplies a range of values to an individual parameter of a parameterized test.

[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true, Inherited = false)]
public class RangeAttribute : NUnitAttribute, IParameterDataSource
Inheritance
RangeAttribute
Implements
Inherited Members

Constructors

RangeAttribute(double, double, double)

Constructs a range of double values with the specified step size.

public RangeAttribute(double from, double to, double step)

Parameters

from double
to double
step double

RangeAttribute(int, int)

Constructs a range of int values using the default step of 1.

public RangeAttribute(int from, int to)

Parameters

from int
to int

RangeAttribute(int, int, int)

Constructs a range of int values with the specified step size.

public RangeAttribute(int from, int to, int step)

Parameters

from int
to int
step int

RangeAttribute(long, long)

Constructs a range of long values using a default step of 1.

public RangeAttribute(long from, long to)

Parameters

from long
to long

RangeAttribute(long, long, long)

Constructs a range of long values with the specified step size.

public RangeAttribute(long from, long to, long step)

Parameters

from long
to long
step long

RangeAttribute(float, float, float)

Constructs a range of float values with the specified step size.

public RangeAttribute(float from, float to, float step)

Parameters

from float
to float
step float

RangeAttribute(uint, uint)

Constructs a range of uint values using the default step of 1.

[CLSCompliant(false)]
public RangeAttribute(uint from, uint to)

Parameters

from uint
to uint

RangeAttribute(uint, uint, uint)

Constructs a range of uint values with the specified step size.

[CLSCompliant(false)]
public RangeAttribute(uint from, uint to, uint step)

Parameters

from uint
to uint
step uint

RangeAttribute(ulong, ulong)

Constructs a range of ulong values using the default step of 1.

[CLSCompliant(false)]
public RangeAttribute(ulong from, ulong to)

Parameters

from ulong
to ulong

RangeAttribute(ulong, ulong, ulong)

Constructs a range of ulong values with the specified step size.

[CLSCompliant(false)]
public RangeAttribute(ulong from, ulong to, ulong step)

Parameters

from ulong
to ulong
step ulong

Methods

GetData(IParameterInfo)

Retrieves a list of arguments which can be passed to the specified parameter.

public IEnumerable GetData(IParameterInfo parameter)

Parameters

parameter IParameterInfo

The parameter of a parameterized test.

Returns

IEnumerable

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string