public class MoreAsserts extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MoreAsserts.Block
Like a
Runnable, except it's allowed to throw anything. |
| Constructor and Description |
|---|
MoreAsserts() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
assertNotEquals(String message,
T t1,
T t2)
Asserts that the given two values are not equal.
|
static <T> void |
assertNotEquals(T t1,
T t2)
Asserts that the given two values are not equal.
|
static <T extends Throwable> |
assertThrows(Class<T> thrownType,
MoreAsserts.Block block)
Assert that the given block throws.
|
public static <T extends Throwable> T assertThrows(Class<T> thrownType, MoreAsserts.Block block)
thrownType - the expected type of what is thrownblock - the block that should throwpublic static <T> void assertNotEquals(T t1,
T t2)
t1 - a valuet2 - another valuepublic static <T> void assertNotEquals(String message, T t1, T t2)
message - the error message if the assertion failst1 - a valuet2 - another value