assertThrows
Asserts that the call resulted in a throwable of type type
and returns the throwable. Otherwise, an AssertionFailedError containing the message supplied by messageSupplier
will be thrown. messageSupplier
is allowed to supply null
.
Return
the throwable resulted by the call
Parameters
the type of the expected throwable
a supplier for the message if the throwable was not thrown
the type of the expected throwable
See also
Throws
if the call did not result in a throwable of type type
Asserts that the call resulted in a throwable of type type
and returns the throwable. Otherwise, an AssertionFailedError containing message
will be thrown.
Return
the throwable resulted by the call
Parameters
the type of the expected throwable
the message if the expected throwable was not thrown
the type of the expected throwable
Throws
if the call did not result in a throwable of type type
Asserts that the call resulted in n throwable of type type
and returns the throwable. Otherwise, an AssertionFailedError will be thrown.
Return
the throwable resulted by the call
Parameters
the type of the expected throwable
the type of the expected throwable
Throws
if the call did not result in a throwable of type type