expectThrowsAnyOf

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


fun <TO : Throwable, TW : Throwable> expectThrowsAnyOf(expectedOuterToWrappedTypes: Map<KClass<out TO>, MutableList<KClass<out TW>>>, runnable: LuceneTestCase.ThrowingRunnable): TO?

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

This method accepts outer exceptions with no wrapped exception; an empty list of expected wrapped exception types indicates no wrapped exception.