|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.jqno.equalsverifier.util.Assert
public class Assert
Alternative for org.junit.Assert, so we can assert things without having a dependency on JUnit.
Method Summary | |
---|---|
static void |
assertEquals(Formatter message,
Object expected,
Object actual)
Asserts that two Objects are equal to one another. |
static void |
assertFalse(Formatter message,
boolean assertion)
Asserts that an assertion is true. |
static void |
assertTrue(Formatter message,
boolean assertion)
Asserts that an assertion is false. |
static void |
fail(Formatter message)
Throws an AssertionException. |
static void |
fail(Formatter message,
Throwable cause)
Throws an AssertionException. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void assertEquals(Formatter message, Object expected, Object actual)
message
- Message to be included in the AssertionException
.expected
- Expected value.actual
- Actual value.
AssertionException
- If expected
and actual
are not
equal.public static void assertFalse(Formatter message, boolean assertion)
message
- Message to be included in the AssertionException
.assertion
- Assertion that must be true.
AssertionException
- If assertion
is false.public static void assertTrue(Formatter message, boolean assertion)
message
- Message to be included in the AssertionException
.assertion
- Assertion that must be true.
AssertionException
- If assertion
is false.public static void fail(Formatter message)
message
- Message to be included in the AssertionException
.
AssertionException
- Always.public static void fail(Formatter message, Throwable cause)
message
- Message to be included in the AssertionException
.
AssertionException
- Always.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |