expectThrows

fun <T : Throwable> expectThrows(expectedType: KClass<T>, runnable: LuceneTestCase.ThrowingRunnable): T
fun <T : Throwable> expectThrows(expectedType: KClass<T>, noExceptionMessage: String?, runnable: LuceneTestCase.ThrowingRunnable): T

Checks a specific exception class is thrown by the given runnable, and returns it.


fun <TO : Throwable, TW : Throwable> expectThrows(expectedOuterType: KClass<TO>, expectedWrappedType: KClass<TW>, runnable: LuceneTestCase.ThrowingRunnable): TW

Checks that specific wrapped and outer exception classes are thrown by the given runnable, and returns the wrapped exception.