org.apache.lucene.util
Class UncaughtExceptionsRule
java.lang.Object
org.apache.lucene.util.UncaughtExceptionsRule
- All Implemented Interfaces:
- org.junit.rules.TestRule
public class UncaughtExceptionsRule
- extends Object
- implements org.junit.rules.TestRule
Subscribes to
Thread.setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler)
and causes test/ suite failures if uncaught exceptions are detected.
Method Summary |
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement s,
org.junit.runner.Description d)
|
boolean |
hasUncaughtExceptions()
Just a check if anything's been caught. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UncaughtExceptionsRule
public UncaughtExceptionsRule(LuceneTestCase ltc)
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement s,
org.junit.runner.Description d)
- Specified by:
apply
in interface org.junit.rules.TestRule
hasUncaughtExceptions
public boolean hasUncaughtExceptions()
- Just a check if anything's been caught.