RangeAttribute Class

Summary

Supplies a range of values to an individual parameter of a parameterized test.
Namespace
TCLite
Interfaces
Base Types
graph BT Type-->Base0["DataParamAttribute"] click Base0 "/tc-lite/api/TCLite/DataParamAttribute" Base0-->Base1["TCLiteAttribute"] click Base1 "/tc-lite/api/TCLite/TCLiteAttribute" Base1-->Base2["Attribute"] Base2-->Base3["object"] Type-.->Interface0["IParameterDataSource"] click Interface0 "/tc-lite/api/TCLite.Interfaces/IParameterDataSource" Type["RangeAttribute"] class Type type-node

Syntax

[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true, Inherited = false)]
public class RangeAttribute : DataParamAttribute, IParameterDataSource

Attributes

Type Description
AttributeUsageAttribute

Constructors

Name Summary
RangeAttribute(double, double, double) Constructs a range of double values with the specified step size.
RangeAttribute(float, float, float) Constructs a range of float values with the specified step size.
RangeAttribute(int, int, int) Constructs a range of int values with the specified step size.
RangeAttribute(int, int) Constructs a range of int values using the default step of 1.
RangeAttribute(long, long, long) Constructs a range of System.Int64 values with the specified step size.
RangeAttribute(long, long) Constructs a range of long values using a default step of 1.
RangeAttribute(uint, uint, uint) Constructs a range of System.UInt32 values with the specified step size.
RangeAttribute(uint, uint) Constructs a range of uint values using the default step of 1.
RangeAttribute(ulong, ulong, ulong) Constructs a range of ulong values with the specified step size.
RangeAttribute(ulong, ulong) Constructs a range of ulong values using the default step of 1.

Methods

Name Value Summary
Convert(object, Type) object
Converts a single value to the targetType, if it is supported.
Inherited from DataParamAttribute
static
ConvertData(object[], Type) IEnumerable
Converts an array of objects to the targetType, if it is supported.
Inherited from DataParamAttribute
static
GetData(ParameterInfo) IEnumerable
Retrieves a list of arguments which can be passed to the specified parameter.
ToString() string
Returns a string that represents the current object.
TryConvert(object, Type, object) bool
Performs several special conversions allowed by NUnit in order to permit arguments with types that cannot be used in the constructor of an Attribute such as TestCaseAttribute or to simplify their use.
Inherited from DataParamAttribute
static