mockito-kotlin / com.nhaarman.mockitokotlin2 / org.mockito.stubbing.OngoingStubbing / doThrow

doThrow

infix fun <T> OngoingStubbing<T>.doThrow(t: Throwable): OngoingStubbing<T>

Sets Throwable objects to be thrown when the method is called.

Alias for OngoingStubbing.thenThrow.

fun <T> OngoingStubbing<T>.doThrow(t: Throwable, vararg ts: Throwable): OngoingStubbing<T>

Sets Throwable objects to be thrown when the method is called.

Alias for OngoingStubbing.doThrow.

infix fun <T> OngoingStubbing<T>.doThrow(t: KClass<out Throwable>): OngoingStubbing<T>

Sets a Throwable type to be thrown when the method is called.

fun <T> OngoingStubbing<T>.doThrow(t: KClass<out Throwable>, vararg ts: KClass<out Throwable>): OngoingStubbing<T>

Sets Throwable classes to be thrown when the method is called.