| Modifier and Type | Method and Description |
|---|---|
static <T extends Throwable> |
ThrowsException.throwsException(Class<T> expectedExceptionClass)
Creates a matcher that matches if the examined
Block throws an exception
of the specified expectedExceptionClass. |
static <T extends Throwable> |
ThrowsException.throwsException(Class<T> expectedExceptionClass,
org.hamcrest.Matcher<T> exceptionMatcher)
Creates a matcher that matches if the examined
Block throws an exception
of the specified expectedExceptionClass and is matched by the specified
exceptionMatcher. |
static <T extends Throwable> |
ThrowsException.throwsException(Class<T> expectedExceptionClass,
org.hamcrest.Matcher<T> exceptionMatcher,
org.hamcrest.Matcher<T>... additionalExceptionMatchers)
Creates a matcher that matches if the examined
Block throws an exception
of the specified expectedExceptionClass and is matched by the specified
exceptionMatcher and additionalExceptionMatchers. |
| Modifier and Type | Method and Description |
|---|---|
static void |
LambdaAssert.assertRaises(Block block,
Class<? extends Throwable> expected)
Asserts that the evaluation of a block throws an exception.
|
static void |
LambdaAssert.assertRaises(String message,
Block block,
Class<? extends Throwable> expected)
Asserts that the evaluation of a block throws an exception.
|
protected boolean |
ThrowsException.matchesSafely(Block block) |
Copyright © 2013–2015. All rights reserved.