C# Class NUnit.Framework.Randomizer

Randomizer returns a set of random values in a repeatable way, to allow re-running of tests if necessary.
Inheritance: System.Random
显示文件 Open project: antonsamarsky/emitmapper-tools Class Usage Examples

Public Methods

Method Description
GetDoubles ( double min, double max, int count ) : double[]

Return an array of random doubles with values in a specified range.

GetDoubles ( int count ) : double[]

Return an array of random doubles between 0.0 and 1.0.

GetInts ( int min, int max, int count ) : int[]

Return an array of random ints with values in a specified range.

GetRandomizer ( MemberInfo member ) : Randomizer

Get a randomizer for a particular member, returning one that has already been created if it exists. This ensures that the same values are generated each time the tests are reloaded.

GetRandomizer ( ParameterInfo parameter ) : Randomizer

Get a randomizer for a particular parameter, returning one that has already been created if it exists. This ensures that the same values are generated each time the tests are reloaded.

Randomizer ( ) : System

Construct a randomizer using a random seed

Randomizer ( int seed ) : System

Construct a randomizer using a specified seed

Method Details

GetDoubles() public method

Return an array of random doubles with values in a specified range.
public GetDoubles ( double min, double max, int count ) : double[]
min double
max double
count int
return double[]

GetDoubles() public method

Return an array of random doubles between 0.0 and 1.0.
public GetDoubles ( int count ) : double[]
count int
return double[]

GetInts() public method

Return an array of random ints with values in a specified range.
public GetInts ( int min, int max, int count ) : int[]
min int
max int
count int
return int[]

GetRandomizer() public static method

Get a randomizer for a particular member, returning one that has already been created if it exists. This ensures that the same values are generated each time the tests are reloaded.
public static GetRandomizer ( MemberInfo member ) : Randomizer
member System.Reflection.MemberInfo
return Randomizer

GetRandomizer() public static method

Get a randomizer for a particular parameter, returning one that has already been created if it exists. This ensures that the same values are generated each time the tests are reloaded.
public static GetRandomizer ( ParameterInfo parameter ) : Randomizer
parameter System.Reflection.ParameterInfo
return Randomizer

Randomizer() public method

Construct a randomizer using a random seed
public Randomizer ( ) : System
return System

Randomizer() public method

Construct a randomizer using a specified seed
public Randomizer ( int seed ) : System
seed int
return System