Summary
Supplies a set of random values to a single parameter of a parameterized test.
- Namespace
- TCLite
- Interfaces
- Base Types
-
- object
- Attribute
- TCLiteAttribute
- DataParamAttribute
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["RandomAttribute"]
class Type type-node
Syntax
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
public class RandomAttribute : DataParamAttribute, IParameterDataSource
Attributes
Type | Description |
---|---|
Attribute |
Constructors
Name | Summary |
---|---|
RandomAttribute |
Generates System.Byte values within a specified range.
|
RandomAttribute |
Generates double values within a specified range.
|
RandomAttribute |
Generates System.Single values within a specified range.
|
RandomAttribute |
Generates int values within a specified range.
|
RandomAttribute |
Construct a random set of values appropriate for the Type of the parameter on which the attribute appears, specifying only the count. |
RandomAttribute |
Generates long values within a specified range.
|
RandomAttribute |
Generates sbyte values within a specified range.
|
RandomAttribute |
Generates short values within a specified range.
|
RandomAttribute |
Generates uint values within a specified range.
|
RandomAttribute |
Generates ulong values within a specified range.
|
RandomAttribute |
Generates ushort values within a specified range.
|
Properties
Name | Value | Summary |
---|---|---|
Distinct | bool |
If true, no value will be repeated.
|
Methods
Name | Value | Summary |
---|---|---|
Convert |
object |
Converts a single value to the targetType, if it is supported.
Inherited from DataParamAttribute
static
|
ConvertData |
IEnumerable |
Converts an array of objects to the targetType, if it is supported.
Inherited from DataParamAttribute
static
|
GetData |
IEnumerable |
Retrieves a list of arguments which can be passed to the specified parameter.
|
TryConvert |
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
|