public final class IllegalStateAssertion extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
assertEquals(T exp,
T was,
String message)
Throws an IllegalStateException when the given values are not equal.
|
static Boolean |
assertFalse(Boolean value,
String message)
Throws an IllegalStateException when the given value is not false.
|
static <T> T |
assertNotNull(T value,
String message)
Throws an IllegalStateException when the given value is null.
|
static <T> T |
assertNull(T value,
String message)
Throws an IllegalStateException when the given value is not null.
|
static <T> T |
assertSame(T exp,
T was,
String message)
Throws an IllegalStateException when the given values are not equal.
|
static Boolean |
assertTrue(Boolean value,
String message)
Throws an IllegalStateException when the given value is not true.
|
public static <T> T assertNull(T value,
String message)
T - The generic type of the value to assert if nullvalue - the value to assert if nullmessage - the message to display if value is not nullpublic static <T> T assertNotNull(T value,
String message)
T - The generic type of the value to assert if not nullvalue - the value to assert if not nullmessage - the message to display if value is nullpublic static Boolean assertTrue(Boolean value, String message)
value - the value to assert if truemessage - the message to display if the value is falsepublic static Boolean assertFalse(Boolean value, String message)
value - the value to assert if falsemessage - the message to display if the value is falsepublic static <T> T assertEquals(T exp,
T was,
String message)
T - The generic type of the expected valueT - The generic type of the actual valueexp - The expected valuewas - The actual valuemessage - The message to display if the compared values are not equalpublic static <T> T assertSame(T exp,
T was,
String message)
T - The generic type of the expected valueT - The generic type of the actual valueexp - The expected valuewas - The actual valuemessage - The message to display if the compared values are not equalCopyright © 2017. All rights reserved.