public final class ExceptionTester extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
test(Class<? extends Throwable>... throwables)
Deprecated.
use
testExceptions(Class[]) ()} instead. |
static void |
testException(Class<? extends Throwable> throwable)
Test single exception.
|
static void |
testExceptions(Class<? extends Throwable>... throwables)
Test array of exceptions.
|
static void |
testExceptionWithArgs(Class<? extends Throwable> throwable,
Object... args)
Test single exception.
|
@Deprecated public static void test(Class<? extends Throwable>... throwables) throws IllegalAccessException, InstantiationException, InvocationTargetException
testExceptions(Class[]) ()} instead.@SafeVarargs public static void testExceptions(Class<? extends Throwable>... throwables) throws IllegalAccessException, InstantiationException, InvocationTargetException
throwables - Exceptions to test.IllegalAccessException - If access control denied access to constructor of exception.InstantiationException - If constructor of exception is from an abstract class.InvocationTargetException - If constructor of exception throws exception.public static void testException(Class<? extends Throwable> throwable) throws IllegalAccessException, InstantiationException, InvocationTargetException
throwable - Exception to test.IllegalAccessException - If access control denied access to constructor of exception.InstantiationException - If constructor of exception is from an abstract class.InvocationTargetException - If constructor of exception throws exception.public static void testExceptionWithArgs(Class<? extends Throwable> throwable, Object... args) throws IllegalAccessException, InstantiationException, InvocationTargetException
throwable - Exception to test.args - Constructor arguments for the exception to test.IllegalAccessException - If access control denied access to constructor of exception.InstantiationException - If constructor of exception is from an abstract class.InvocationTargetException - If constructor of exception throws exception.Copyright © 2017. All rights reserved.