<PackageReference Include="NUnit" Version="4.3.2" />

Randomizer

public class Randomizer : Random
public const string DefaultStringChars = "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789_"

public static int InitialSeed { get; set; }

public Randomizer()

public Randomizer(int seed)

public static Randomizer CreateRandomizer()

public static Randomizer GetRandomizer(MemberInfo member)

public static Randomizer GetRandomizer(ParameterInfo parameter)

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 string GetString(int outputLength, string allowedChars)

Generate a random string based on the characters from the input string.

public string GetString(int outputLength)

Generate a random string based on the characters from the input string.

public string GetString()

Generate a random string based on the characters from the input string.

public bool NextBool()

Returns a random bool

public bool NextBool(double probability)

Returns a random bool based on the probability a true result

public byte NextByte()

Returns a random Byte

public byte NextByte(byte max)

Returns a random Byte less than the specified maximum.

public byte NextByte(byte min, byte max)

Returns a random Byte within a specified range

public decimal NextDecimal()

Returns a random decimal.

public decimal NextDecimal(decimal max)

Returns a random decimal between positive zero and the specified maximum.

public decimal NextDecimal(decimal min, decimal max)

Returns a random decimal within a specified range, which is not permitted to exceed decimal.MaxVal in the current implementation.

public double NextDouble(double max)

Returns a random double between 0.0 and the specified maximum.

public double NextDouble(double min, double max)

Returns a random double within a specified range.

public object NextEnum(Type type)

Returns a random enum value of the specified Type as an object.

public T NextEnum<T>()

Returns a random enum value of the specified Type.

public float NextFloat()

Returns a random float.

public float NextFloat(float max)

Returns a random float between 0.0 and the specified maximum.

public float NextFloat(float min, float max)

Returns a random float within a specified range.

public Guid NextGuid()

Generates a valid version 4 Guid.

public long NextLong()

Returns a random long.

public long NextLong(long max)

Returns a random long less than the specified maximum.

public long NextLong(long min, long max)

Returns a non-negative random long within a specified range.

public sbyte NextSByte()

Returns a random SByte

public sbyte NextSByte(sbyte max)

Returns a random sbyte less than the specified maximum.

public sbyte NextSByte(sbyte min, sbyte max)

Returns a random sbyte within a specified range

public short NextShort()

Returns a non-negative random short.

public short NextShort(short max)

Returns a non-negative random short less than the specified maximum.

public short NextShort(short min, short max)

Returns a non-negative random short within a specified range.

public uint NextUInt()

Returns a random unsigned int.

public uint NextUInt(uint max)

Returns a random unsigned int less than the specified maximum.

public uint NextUInt(uint min, uint max)

Returns a random unsigned int within a specified range.

public ulong NextULong()

Returns a random ulong.

public ulong NextULong(ulong max)

Returns a random ulong less than the specified maximum.

public ulong NextULong(ulong min, ulong max)

Returns a non-negative random long within a specified range.

public ushort NextUShort()

Returns a random unsigned short.

public ushort NextUShort(ushort max)

Returns a random unsigned short less than the specified maximum.

public ushort NextUShort(ushort min, ushort max)

Returns a random unsigned short within a specified range.