<PackageReference Include="NUnit" Version="3.0.0-alpha-3" />

RandomGenerator

public class RandomGenerator
RandomGenerator returns a set of random _values in a repeatable way, to allow re-running of tests if necessary. This class is internal to the framework but exposed externally to through the TestContext the class is used to allow for obtaining repeatable random _values during a tests execution. this class should not be used inside the framework only with a TestMethod.
public readonly int seed

Seed for the wrapped Random

public RandomGenerator(int seed)

Constructor requires Seed value in order to store it for use in Random creation

public bool GetBool()

Get Random Boolean value

public bool GetBool(double probability)

Get Random Boolean value based on the probability of that value being true

public byte GetByte()

Get Next Byte from Random

public byte GetByte(byte min, byte max)

Get Next Byte within the specified min & max from Random

public double GetDouble()

Get Next Double from Random

public T GetEnum<T>()

Return a random enum value representation of the specified Type

public float GetFloat()

Get Next Float from Random

public int GetInt()

Get Next Integer from Random

public int GetInt(int min, int max)

Get Next Integer within the specified min & max from Random

public short GetShort()

Get Next Short from Random

public short GetShort(short min, short max)

Get Next Short within the specified min & max from Random