List of utility methods to do Assert True
void | assertTrue(boolean expression) Check that expression is true. if (!expression) { throw new IllegalArgumentException("[Assertion failed] - this expression must be true"); |
void | assertTrue(boolean expValue, String errMsg) assert True if (!expValue) { throw new RuntimeException(errMsg); |
void | assertTrue(boolean value) assert True if (!value) { fail("assertionFailed"); |
void | assertTrue(final boolean condition, final String message) Assert that the statement is true, otherwise throw an exception with the provided message. if (!condition) { throw new IllegalArgumentException(message); |
void | assertTrue(final boolean result, final String faultDescription) assert True if (!result) { throw new IllegalArgumentException(String.format( "[Assertion failed error. Expected true value for %s, but got false]", faultDescription)); |
void | assertTrue(final String message, final boolean condition) assert True if (!condition) {
fail(message);
|
void | assertTrue(String message, boolean condition) Asserts that a condition is true. if (!condition)
fail(message);
|
void | assertTrue(String message, boolean condition) assert True if (!condition)
fail(message);
|
void | assertTrue(String message, boolean condition) assert True if (!condition) { if (message == null) { throw new AssertionError(); } else { throw new AssertionError(message); |
void | assertTrue(String msg, boolean value) AssertTrue with message if (!value) { throw new AssertionError(msg); |