public abstract class AssertionErrors extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
assertEquals(String message,
Object expected,
Object actual)
Asserts that two objects are equal.
|
static void |
assertEquals(String message,
Object expected,
Object actual,
String sourceLabel,
Source source)
Asserts that two objects are equal.
|
static void |
assertTrue(String message,
boolean condition)
Asserts that a condition is
true. |
static void |
assertTrue(String message,
boolean condition,
String sourceLabel,
Source source)
Asserts that a condition is
true. |
static void |
fail(String message)
Fails a test with the given message.
|
static void |
fail(String message,
String sourceLabel,
Source source)
Fails a test with the given message and source.
|
public static void fail(String message)
message - the messagepublic static void fail(String message, String sourceLabel, Source source)
message - the messagesource - the sourcepublic static void assertTrue(String message, boolean condition)
true. If not, throws an AssertionError with the given message.message - the messagecondition - the condition to test forpublic static void assertTrue(String message, boolean condition, String sourceLabel, Source source)
true. If not, throws an AssertionError with the given message and
source.message - the messagecondition - the condition to test forpublic static void assertEquals(String message, Object expected, Object actual)
AssertionError is thrown with the given message.message - the messageexpected - the expected valueactual - the actual valuepublic static void assertEquals(String message, Object expected, Object actual, String sourceLabel, Source source)
AssertionError is thrown with the given message.message - the messageexpected - the expected valueactual - the actual valuesource - the source