public abstract class AbstractTester<T extends AbstractTester<T>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<Class<?>,ValueBuilder<?>> |
mappings |
| Constructor and Description |
|---|
AbstractTester() |
| Modifier and Type | Method and Description |
|---|---|
<V,W extends V> |
addMapping(Class<V> type,
ValueBuilder<W> builder)
Adds a type mapping to instruct the tester how a certain type should be
instantiated.
|
<V,W extends V> |
addMapping(Class<V> type,
W value)
Adds a type mapping to instruct the tester how a certain type should be
mapped.
|
protected Object |
getInstance(Class<?> type) |
protected Map<Class<?>,ValueBuilder<?>> mappings
public <V,W extends V> T addMapping(Class<V> type, W value)
V - the type of the mappingW - the value to be used when testingtype - the type you want to mapvalue - the value that will be used to valorize/check fieldsAbstractTester instancepublic <V,W extends V> T addMapping(Class<V> type, ValueBuilder<W> builder)
V - the type of the mappingW - the value to be used when testingtype - the type you want to mapbuilder - a ValueBuilder implementation capable of
generating pseudo-random instances of the given type.AbstractTester instanceprotected Object getInstance(Class<?> type) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
Copyright © 2015. All rights reserved.