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
Afficher le fichier Open project: antonsamarsky/emitmapper-tools Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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
Résultat double[]

GetDoubles() public méthode

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

GetInts() public méthode

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
Résultat int[]

GetRandomizer() public static méthode

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
Résultat Randomizer

GetRandomizer() public static méthode

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
Résultat Randomizer

Randomizer() public méthode

Construct a randomizer using a random seed
public Randomizer ( ) : System
Résultat System

Randomizer() public méthode

Construct a randomizer using a specified seed
public Randomizer ( int seed ) : System
seed int
Résultat System