public class JblTestClassUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
assertConstructorIsPrivate(java.lang.Class clazz)
Asserts that the constructor of a Class is private.
|
static <T> boolean |
assertGetterCorrectForConstructorInjection(java.util.Map<java.lang.String,java.lang.Object> injectedValues,
T bean)
Asserts that getter methods return the correct values when a class in initialised by a constructor.
|
static <T> boolean |
assertSettersAndGettersCorrect(java.util.Map<java.lang.String,java.lang.Object> injectedValues,
T bean,
java.util.Map<java.lang.String,java.lang.Class> typeOverrides)
Asserts that getter methods return the same values applied by the setter method in a class.
|
public static boolean assertConstructorIsPrivate(java.lang.Class clazz)
To be used with unit testing.
clazz - Class to test.public static <T> boolean assertGetterCorrectForConstructorInjection(java.util.Map<java.lang.String,java.lang.Object> injectedValues,
T bean)
T - the bean object typeinjectedValues - the map containing the property name and value pairs to be checkedbean - the class that is initialisedpublic static <T> boolean assertSettersAndGettersCorrect(java.util.Map<java.lang.String,java.lang.Object> injectedValues,
T bean,
java.util.Map<java.lang.String,java.lang.Class> typeOverrides)
T - the bean object typeinjectedValues - the map containing the property name and value pairs to be checkedbean - the class that is under testtypeOverrides - the map containing type overrides for the property