| Package | Description |
|---|---|
| org.exparity.stub.bean | |
| org.exparity.stub.core | |
| org.exparity.stub.random | |
| org.exparity.stub.stub |
| Modifier and Type | Method and Description |
|---|---|
<X> BeanBuilder<T> |
BeanBuilder.factory(Class<X> type,
ValueFactory<X> factory)
Configure the builder to populate any properties of the given type with a value created by the supplied value
factory.
|
BeanBuilder<T> |
BeanBuilder.path(String path,
ValueFactory<?> factory)
Configure the builder to populate the given path with a value created by the supplied value factory.
|
BeanBuilder<T> |
BeanBuilder.property(String propertyName,
ValueFactory<?> factory)
Configure the builder to populate the given property with a value created by the supplied value factory.
|
<V> BeanBuilder<T> |
BeanBuilder.with(Class<V> type,
ValueFactory<V> factory)
Configure the builder to populate any properties of the given type with a value created by the supplied value
factory.
|
BeanBuilder<T> |
BeanBuilder.with(String propertyOrPathName,
ValueFactory<?> factory)
Configure the builder to populate the given property or path with a value created by the supplied value factory.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> ValueFactory<T> |
ValueFactories.anEmptyInstanceOf(Class<T> type)
Creates an
ValueFactory which returns a new unpopulated instance of the given type. |
static ValueFactory<Object> |
ValueFactories.aNullValue()
Creates an
ValueFactory which returns a null value. |
static ValueFactory<Boolean> |
ValueFactories.aRandomBoolean()
Creates an
ValueFactory which returns a random Boolean. |
static ValueFactory<Byte> |
ValueFactories.aRandomByte()
Creates an
ValueFactory which returns a random Byte. |
static ValueFactory<byte[]> |
ValueFactories.aRandomByteArray()
Creates an
ValueFactory which returns a random array of bytes |
static ValueFactory<Character> |
ValueFactories.aRandomChar()
Creates an
ValueFactory which returns a random Character. |
static ValueFactory<Date> |
ValueFactories.aRandomDate()
Creates an
ValueFactory which returns a random Date. |
static ValueFactory<BigDecimal> |
ValueFactories.aRandomDecimal()
Creates an
ValueFactory which returns a random BigDecimal. |
static ValueFactory<Double> |
ValueFactories.aRandomDouble()
Creates an
ValueFactory which returns a random Double. |
static <E> ValueFactory<E> |
ValueFactories.aRandomEnum(Class<E> enumType)
Creates an
ValueFactory which returns a random enum from the supplied Enum type. |
static ValueFactory<Float> |
ValueFactories.aRandomFloat()
Creates an
ValueFactory which returns a random Float. |
static ValueFactory<Instant> |
ValueFactories.aRandomInstant()
Creates an
ValueFactory which returns a random Instant. |
static ValueFactory<Integer> |
ValueFactories.aRandomInteger()
Creates an
ValueFactory which returns a random Integer. |
static ValueFactory<LocalDate> |
ValueFactories.aRandomLocalDate()
Creates an
ValueFactory which returns a random LocalDate. |
static ValueFactory<LocalDateTime> |
ValueFactories.aRandomLocalDateTime()
Creates an
ValueFactory which returns a random LocalDateTime. |
static ValueFactory<LocalTime> |
ValueFactories.aRandomLocalTime()
Creates an
ValueFactory which returns a random LocalTime. |
static ValueFactory<Long> |
ValueFactories.aRandomLong()
Creates an
ValueFactory which returns a random Long. |
static ValueFactory<Short> |
ValueFactories.aRandomShort()
Creates an
ValueFactory which returns a random Short. |
static ValueFactory<String> |
ValueFactories.aRandomString()
Creates an
ValueFactory which returns a random String. |
static ValueFactory<ZonedDateTime> |
ValueFactories.aRandomZonedDateTime()
Creates an
ValueFactory which returns a random ZonedDateTime. |
static <T> ValueFactory<T> |
ValueFactories.oneOf(Collection<ValueFactory<T>> factories)
Creates an
ValueFactory which returns a random instance of the given type by using one of the supplied ValueFactory instances. |
static <T> ValueFactory<T> |
ValueFactories.oneOf(List<ValueFactory<T>> factories)
Creates an
ValueFactory which returns a random instance of the given type by using one of the supplied ValueFactory instances. |
static <T> ValueFactory<T> |
ValueFactories.oneOf(T... instances)
Creates an
ValueFactory which randomly returns one of the supplied instances. |
static <T> ValueFactory<T> |
ValueFactories.oneOf(ValueFactory<T>... factories)
Creates an
ValueFactory which returns a random instance of the given type by using one of the supplied ValueFactory instances. |
static <T> ValueFactory<T> |
ValueFactories.theValue(T value)
Creates an
ValueFactory which returns the supplied value. |
| Modifier and Type | Method and Description |
|---|---|
static <A> ArrayFactory<A> |
ValueFactories.aRandomArrayOf(ValueFactory<A> typeFactory)
Creates an
ArrayFactory which returns a random array of the given type. |
static <T> ValueFactory<T> |
ValueFactories.oneOf(ValueFactory<T>... factories)
Creates an
ValueFactory which returns a random instance of the given type by using one of the supplied ValueFactory instances. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ValueFactory<T> |
ValueFactories.oneOf(Collection<ValueFactory<T>> factories)
Creates an
ValueFactory which returns a random instance of the given type by using one of the supplied ValueFactory instances. |
static <T> ValueFactory<T> |
ValueFactories.oneOf(List<ValueFactory<T>> factories)
Creates an
ValueFactory which returns a random instance of the given type by using one of the supplied ValueFactory instances. |
| Modifier and Type | Method and Description |
|---|---|
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,
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,
ValueFactory<?> factory)
Build and instance of a
RandomBuilder.RandomRestriction which assigns an ValueFactory derived value to the
specific property. |
| Modifier and Type | Method and Description |
|---|---|
<X> StubBuilder<T> |
StubBuilder.factory(Class<X> type,
ValueFactory<X> factory)
Configure the builder to populate any properties of the given type with a
value created by the supplied value factory.
|
<V> StubBuilder<T> |
StubBuilder.with(Class<V> type,
ValueFactory<V> factory)
Configure the builder to populate any properties of the given type with a
value created by the supplied value factory.
|
Copyright © 2018. All rights reserved.