public final class TestUtils extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
static void |
assertInstanceOf(Object object,
Class<?> type)
Test that givne object is an instance of given type.
|
static <E extends Enum> |
checkEnum(Class<E> enm)
Java synthetic enum methods test for code coverage
|
static void |
checkUtilityClass(Class<?> clazz)
Check utility class well defined: is final, has only one private constructor and all methods are static
|
static void |
expectedException(Class<? extends Throwable> exceptionClass,
org.junit.jupiter.api.function.Executable operation)
Test an expected exception is thrown using a
Callable operation |
public static void checkUtilityClass(Class<?> clazz)
clazz - Class to checkpublic static <E extends Enum> void checkEnum(Class<E> enm)
E - Enum typeenm - Enum o checkpublic static void expectedException(Class<? extends Throwable> exceptionClass, org.junit.jupiter.api.function.Executable operation)
Callable operationexceptionClass - Expected exceptionoperation - Operation to executeCopyright © 2019 The Holon Platform. All rights reserved.