public final class TestUtil extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
fill(Class<T> entityClass)
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 <T> List<T> |
fill(Class<T> entityClass,
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.
|
public static void fill(Object entity)
entity
- an entity object with getter/setter methodpublic static <T> T fill(Class<T> entityClass)
T
- entityClass
- entity class with getter/setter methodspublic static <T> List<T> fill(Class<T> entityClass, int count)
T
- entityClass
- entity class with getter/setter methodscount
- public static void fill(Object entity, Collection<String> propNamesToFill)
entity
- an entity object with getter/setter methodpropNamesToFill
- public static <T> T fill(Class<T> entityClass, Collection<String> propNamesToFill)
T
- entityClass
- entity class with getter/setter methodspropNamesToFill
- public static <T> List<T> fill(Class<T> entityClass, Collection<String> propNamesToFill, int count)
T
- entityClass
- entity class with getter/setter methodspropNamesToFill
- count
- Copyright © 2019. All rights reserved.