Package dev.orne.test.rnd
Class GeneratorsTestUtils
java.lang.Object
dev.orne.test.rnd.GeneratorsTestUtils
Utilities for generators test.
- Since:
- 0.1
- Version:
- 1.0, 2022-12
- Author:
- (w) Iker Hernaez
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NotNull Set<T>
assertNullableRandomGeneration
(@NotNull Generator generator, @NotNull Class<T> type, int minValues, int timeout) Assert that callingGenerator.nullableRandomValue(Class<?>)
for the specified type generates null and random values.static <T> @NotNull Set<T>
assertNullableRandomGeneration
(@NotNull ParameterizableGenerator generator, @NotNull Class<T> type, int minValues, int timeout, Object... params) Assert that callingGenerator.nullableRandomValue(Class<?>, Object...)
for the specified type generates null and random values.static <T> @NotNull Set<@NotNull T>
assertNullableRandomGeneration
(@NotNull TypedParameterizableGenerator<T> generator, int minValues, int timeout, Object... params) Assert that callingTypedGenerator.nullableRandomValue(Object...)
generates null and random values.static <T> @NotNull Set<@NotNull T>
assertNullableRandomGeneration
(@NotNull TypedGenerator<T> generator, int minValues, int timeout) Assert that callingTypedGenerator.nullableRandomValue()
generates null and random values.static <T> @NotNull Set<@NotNull T>
assertNullableRandomGeneration
(@NotNull Class<T> type, int minValues, int timeout) Assert that callingGenerators.nullableRandomValue(Class<?>)
for the specified type generates null and random values.static <T> @NotNull Set<T>
assertNullableRandomGeneration
(@NotNull Class<T> type, int minValues, int timeout, Object... params) Assert that callingGenerators.nullableRandomValue(Class<?>, Object...)
for the specified type generates null and random values.static <T> @NotNull Set<@NotNull T>
assertNullableRandomGeneration
(@NotNull Supplier<T> supplier, int minValues, int timeout) Assert that calling the specified supplier generates null and random values.static <T> @NotNull Set<@NotNull T>
assertRandomGeneration
(@NotNull Generator generator, @NotNull Class<T> type, int minValues, int timeout) Assert that callingGenerator.randomValue(Class<?>)
for the specified type generates non null random values.static <T> @NotNull Set<@NotNull T>
assertRandomGeneration
(@NotNull ParameterizableGenerator generator, @NotNull Class<T> type, int minValues, int timeout, Object... params) Assert that callingParameterizableGenerator.randomValue(Class<?>, Object...)
for the specified type generates non null random values.static <T> @NotNull Set<@NotNull T>
assertRandomGeneration
(@NotNull TypedParameterizableGenerator<T> generator, int minValues, int timeout, Object... params) Assert that callingTypedParameterizableGenerator.randomValue(Object...)
generates non null random values.static <T> @NotNull Set<@NotNull T>
assertRandomGeneration
(@NotNull TypedGenerator<T> generator, int minValues, int timeout) Assert that callingTypedGenerator.randomValue()
generates non null random values.static <T> @NotNull Set<@NotNull T>
assertRandomGeneration
(@NotNull Class<T> type, int minValues, int timeout) Assert that callingGenerators.randomValue(Class<?>)
for the specified type generates non null random values.static <T> @NotNull Set<@NotNull T>
assertRandomGeneration
(@NotNull Class<T> type, int minValues, int timeout, Object... params) Assert that callingGenerators.randomValue(Class<?>, Object...)
for the specified type generates non null random values.static <T> @NotNull Set<@NotNull T>
assertRandomGeneration
(@NotNull Supplier<T> supplier, int minValues, int timeout) Assert that calling the specified supplier generates non null random values.
-
Method Details
-
assertRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertRandomGeneration(@NotNull @NotNull Class<T> type, int minValues, int timeout) Assert that callingGenerators.randomValue(Class<?>)
for the specified type generates non null random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
type
- The type of values to generate.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.- Returns:
- The generated values.
-
assertRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertRandomGeneration(@NotNull @NotNull Generator generator, @NotNull @NotNull Class<T> type, int minValues, int timeout) Assert that callingGenerator.randomValue(Class<?>)
for the specified type generates non null random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
generator
- The generator to use.type
- The type of values to generate.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.- Returns:
- The generated values.
-
assertRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertRandomGeneration(@NotNull @NotNull TypedGenerator<T> generator, int minValues, int timeout) Assert that callingTypedGenerator.randomValue()
generates non null random values.- Type Parameters:
T
- The type of values to generate- Parameters:
generator
- The generator to use.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.- Returns:
- The generated values.
-
assertRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertRandomGeneration(@NotNull @NotNull Class<T> type, int minValues, int timeout, Object... params) Assert that callingGenerators.randomValue(Class<?>, Object...)
for the specified type generates non null random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
type
- The type of values to generate.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.params
- The generation parameters.- Returns:
- The generated values.
-
assertRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertRandomGeneration(@NotNull @NotNull ParameterizableGenerator generator, @NotNull @NotNull Class<T> type, int minValues, int timeout, Object... params) Assert that callingParameterizableGenerator.randomValue(Class<?>, Object...)
for the specified type generates non null random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
generator
- The generator to use.type
- The type of values to generate.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.params
- The generation parameters.- Returns:
- The generated values.
-
assertRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertRandomGeneration(@NotNull @NotNull TypedParameterizableGenerator<T> generator, int minValues, int timeout, Object... params) Assert that callingTypedParameterizableGenerator.randomValue(Object...)
generates non null random values.- Type Parameters:
T
- The type of values to generate- Parameters:
generator
- The generator to use.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.params
- The generation parameters.- Returns:
- The generated values.
-
assertRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertRandomGeneration(@NotNull @NotNull Supplier<T> supplier, int minValues, int timeout) Assert that calling the specified supplier generates non null random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
supplier
- The value ramdom supplier.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.- Returns:
- The generated values.
-
assertNullableRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertNullableRandomGeneration(@NotNull @NotNull Class<T> type, int minValues, int timeout) Assert that callingGenerators.nullableRandomValue(Class<?>)
for the specified type generates null and random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
type
- The type of values to generate.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.- Returns:
- The generated values.
-
assertNullableRandomGeneration
@NotNull public static <T> @NotNull Set<T> assertNullableRandomGeneration(@NotNull @NotNull Generator generator, @NotNull @NotNull Class<T> type, int minValues, int timeout) Assert that callingGenerator.nullableRandomValue(Class<?>)
for the specified type generates null and random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
generator
- The generator to use.type
- The type of values to generate.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.- Returns:
- The generated values.
-
assertNullableRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertNullableRandomGeneration(@NotNull @NotNull TypedGenerator<T> generator, int minValues, int timeout) Assert that callingTypedGenerator.nullableRandomValue()
generates null and random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
generator
- The generator to use.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.- Returns:
- The generated values.
-
assertNullableRandomGeneration
@NotNull public static <T> @NotNull Set<T> assertNullableRandomGeneration(@NotNull @NotNull Class<T> type, int minValues, int timeout, Object... params) Assert that callingGenerators.nullableRandomValue(Class<?>, Object...)
for the specified type generates null and random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
type
- The type of values to generate.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.params
- The generation parameters.- Returns:
- The generated values.
-
assertNullableRandomGeneration
@NotNull public static <T> @NotNull Set<T> assertNullableRandomGeneration(@NotNull @NotNull ParameterizableGenerator generator, @NotNull @NotNull Class<T> type, int minValues, int timeout, Object... params) Assert that callingGenerator.nullableRandomValue(Class<?>, Object...)
for the specified type generates null and random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
generator
- The generator to use.type
- The type of values to generate.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.params
- The generation parameters.- Returns:
- The generated values.
-
assertNullableRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertNullableRandomGeneration(@NotNull @NotNull TypedParameterizableGenerator<T> generator, int minValues, int timeout, Object... params) Assert that callingTypedGenerator.nullableRandomValue(Object...)
generates null and random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
generator
- The generator to use.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.params
- The generation parameters.- Returns:
- The generated values.
-
assertNullableRandomGeneration
@NotNull public static <T> @NotNull Set<@NotNull T> assertNullableRandomGeneration(@NotNull @NotNull Supplier<T> supplier, int minValues, int timeout) Assert that calling the specified supplier generates null and random values.- Type Parameters:
T
- The type of values to generate.- Parameters:
supplier
- The value ramdom supplier.minValues
- The minimum different values to generate.timeout
- The test timeout, in seconds.- Returns:
- The generated values.
-