Class GeneratorsTestUtils

java.lang.Object
dev.orne.test.rnd.GeneratorsTestUtils

public final class GeneratorsTestUtils extends Object
Utilities for generators test.
Since:
0.1
Version:
1.0, 2022-12
Author:
(w) Iker Hernaez
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> @NotNull Set<T>
    assertNullableRandomGeneration(@NotNull Generator generator, @NotNull Class<T> type, int minValues, int timeout)
    Assert that calling Generator.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 calling Generator.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 calling TypedGenerator.nullableRandomValue(Object...) generates null and random values.
    static <T> @NotNull Set<@NotNull T>
    assertNullableRandomGeneration(@NotNull TypedGenerator<T> generator, int minValues, int timeout)
    Assert that calling TypedGenerator.nullableRandomValue() generates null and random values.
    static <T> @NotNull Set<@NotNull T>
    assertNullableRandomGeneration(@NotNull Class<T> type, int minValues, int timeout)
    Assert that calling Generators.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 calling Generators.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 calling Generator.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 calling ParameterizableGenerator.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 calling TypedParameterizableGenerator.randomValue(Object...) generates non null random values.
    static <T> @NotNull Set<@NotNull T>
    assertRandomGeneration(@NotNull TypedGenerator<T> generator, int minValues, int timeout)
    Assert that calling TypedGenerator.randomValue() generates non null random values.
    static <T> @NotNull Set<@NotNull T>
    assertRandomGeneration(@NotNull Class<T> type, int minValues, int timeout)
    Assert that calling Generators.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 calling Generators.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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • assertRandomGeneration

      @NotNull public static <T> @NotNull Set<@NotNull T> assertRandomGeneration(@NotNull @NotNull Class<T> type, int minValues, int timeout)
      Assert that calling Generators.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 calling Generator.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 calling TypedGenerator.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 calling Generators.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 calling ParameterizableGenerator.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 calling TypedParameterizableGenerator.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 calling Generators.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 calling Generator.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 calling TypedGenerator.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 calling Generators.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 calling Generator.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 calling TypedGenerator.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.