Class TestUtil

java.lang.Object
com.landawn.abacus.util.TestUtil

public final class TestUtil extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> T
    fill(Class<T> entityClass)
    Fill the properties of the entity with random values.
    static <T> List<T>
    fill(Class<T> entityClass, int count)
    Fill the properties of the entity with random values.
    static <T> T
    fill(Class<T> entityClass, Collection<String> propNamesToFill)
    Fill the properties of the entity with random values.
    static <T> List<T>
    fill(Class<T> entityClass, Collection<String> propNamesToFill, int count)
    Fill the properties of the entity with random values.
    static void
    fill(Object entity)
    Fill the properties of the entity with random values.
    static void
    fill(Object entity, Collection<String> propNamesToFill)
    Fill the properties of the entity with random values.

    Methods inherited from class java.lang.Object

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

    • fill

      public static void fill(Object entity)
      Fill the properties of the entity with random values.
      Parameters:
      entity - an entity object with getter/setter method
    • fill

      public static void fill(Object entity, Collection<String> propNamesToFill)
      Fill the properties of the entity with random values.
      Parameters:
      entity - an entity object with getter/setter method
      propNamesToFill -
    • fill

      public static <T> T fill(Class<T> entityClass)
      Fill the properties of the entity with random values.
      Type Parameters:
      T -
      Parameters:
      entityClass - entity class with getter/setter methods
      Returns:
    • fill

      public static <T> List<T> fill(Class<T> entityClass, int count)
      Fill the properties of the entity with random values.
      Type Parameters:
      T -
      Parameters:
      entityClass - entity class with getter/setter methods
      count -
      Returns:
    • fill

      public static <T> T fill(Class<T> entityClass, Collection<String> propNamesToFill)
      Fill the properties of the entity with random values.
      Type Parameters:
      T -
      Parameters:
      entityClass - entity class with getter/setter methods
      propNamesToFill -
      Returns:
    • fill

      public static <T> List<T> fill(Class<T> entityClass, Collection<String> propNamesToFill, int count)
      Fill the properties of the entity with random values.
      Type Parameters:
      T -
      Parameters:
      entityClass - entity class with getter/setter methods
      propNamesToFill -
      count -
      Returns: