|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpatterntesting.runtime.util.ExceptionThrower
public final class ExceptionThrower
Because we need the functionality of throwing any exception not only in
PatternTesting Exception but also here this functionality was shifted to
PatternTesting Runtime.
This class is not intended for public use. If you do so use it on your own
risk!
| Method Summary | |
|---|---|
static Throwable |
create(Class<? extends Throwable> type)
Creates any desired exception you want. |
static void |
provoke(Class<? extends Throwable> type)
Be careful - you can provoke any Exception with the method without the need to declare it with a throws statement. |
static void |
provoke(org.junit.Test test)
This method throws the expected exception wrapped into the Test annotation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void provoke(Class<? extends Throwable> type)
provoke(IOException.class)would throw an IOException.
type - e.g. IOException.classpublic static void provoke(org.junit.Test test)
Test annotation.
test - with the expected exception
public static Throwable create(Class<? extends Throwable> type)
throws InstantiationException,
IllegalAccessException
type - the exception class you want to be created
IllegalAccessException - the illegal access exception
InstantiationException - the instantiation exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||