| Package | Description |
|---|---|
| org.exparity.stub.random |
| Modifier and Type | Method and Description |
|---|---|
static <P> RandomBuilder.RandomRestriction |
RandomBuilder.collectionSize(int size)
Build and instance of a
RandomBuilder.RandomRestriction which will limit the size of all collections to the specified size |
static <P> RandomBuilder.RandomRestriction |
RandomBuilder.collectionSize(int min,
int max)
Build and instance of a
RandomBuilder.RandomRestriction which will limit the size of all collections to within the specified range |
static <P> RandomBuilder.RandomRestriction |
RandomBuilder.collectionSizeForPath(String path,
int size)
Build and instance of a
RandomBuilder.RandomRestriction which will set the size of the collection at the specified path |
static <P> RandomBuilder.RandomRestriction |
RandomBuilder.collectionSizeForPath(String path,
int min,
int max)
Build and instance of a
RandomBuilder.RandomRestriction which will limit the size of the collection at the specifed path |
static <P> RandomBuilder.RandomRestriction |
RandomBuilder.collectionSizeForProperty(String property,
int size)
Build and instance of a
RandomBuilder.RandomRestriction which will set the size of the collection at the specified property |
static <P> RandomBuilder.RandomRestriction |
RandomBuilder.collectionSizeForProperty(String property,
int min,
int max)
Build and instance of a
RandomBuilder.RandomRestriction which will limit the size of the collection at the specifed property |
static RandomBuilder.RandomRestriction |
RandomBuilder.excludePath(String path)
Build and instance of a
RandomBuilder.RandomRestriction which will prevent the value at the path being assigned any value |
static RandomBuilder.RandomRestriction |
RandomBuilder.excludeProperty(String property)
Build and instance of a
RandomBuilder.RandomRestriction which will prevent the property being assigned any value |
static <T> RandomBuilder.RandomRestriction |
RandomBuilder.factory(Class<T> type,
ValueFactory<T> factory)
Build and instance of a
RandomBuilder.RandomRestriction which uses the ValueFactory to create instances of the specified type. |
static RandomBuilder.RandomRestriction |
RandomBuilder.path(String path,
Object value)
Build and instance of a
RandomBuilder.RandomRestriction which assigns the value to the specific path |
static RandomBuilder.RandomRestriction |
RandomBuilder.path(String path,
ValueFactory<?> factory)
Build and instance of a
RandomBuilder.RandomRestriction which assigns an ValueFactory derived value to the specific path |
static RandomBuilder.RandomRestriction |
RandomBuilder.property(String property,
Object value)
Build and instance of a
RandomBuilder.RandomRestriction which assigns the value to the specific property. |
static RandomBuilder.RandomRestriction |
RandomBuilder.property(String property,
ValueFactory<?> factory)
Build and instance of a
RandomBuilder.RandomRestriction which assigns an ValueFactory derived value to the specific property. |
static <P> RandomBuilder.RandomRestriction |
RandomBuilder.subtype(Class<P> superType,
Class<? extends P>... subTypes)
Build and instance of a
RandomBuilder.RandomRestriction which will use any of the given sub types of a super type when instantiating the super type. |
static <P> RandomBuilder.RandomRestriction |
RandomBuilder.subtype(Class<P> superType,
Class<? extends P> subType)
Build and instance of a
RandomBuilder.RandomRestriction which will use the given subtype of a super type when instantiating the subtype. |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
RandomBuilder.aRandomInstanceOf(Class<T> type,
RandomBuilder.RandomRestriction... restrictions)
Build a random instance of the supplied type.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
RandomBuilder.aRandomInstanceOf(Class<T> type,
List<RandomBuilder.RandomRestriction> restrictions)
Build a random instance of the supplied type.
|
Copyright © 2015. All rights reserved.