|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert
A set of assert methods.
Method Summary | |
static void |
assert(boolean condition)
Asserts that a condition is true. |
static void |
assert(java.lang.String message,
boolean condition)
Asserts that a condition is true. |
static void |
assertEquals(double expected,
double actual,
double delta)
Asserts that two doubles are equal. |
static void |
assertEquals(long expected,
long actual)
Asserts that two longs are equal. |
static void |
assertEquals(java.lang.Object expected,
java.lang.Object actual)
Asserts that two objects are equal. |
static void |
assertEquals(java.lang.String message,
double expected,
double actual,
double delta)
Asserts that two doubles are equal. |
static void |
assertEquals(java.lang.String message,
long expected,
long actual)
Asserts that two longs are equal. |
static void |
assertEquals(java.lang.String message,
java.lang.Object expected,
java.lang.Object actual)
Asserts that two objects are equal. |
static void |
assertNotNull(java.lang.Object object)
Asserts that an object isn't null. |
static void |
assertNotNull(java.lang.String message,
java.lang.Object object)
Asserts that an object isn't null. |
static void |
assertNull(java.lang.Object object)
Asserts that an object is null. |
static void |
assertNull(java.lang.String message,
java.lang.Object object)
Asserts that an object is null. |
static void |
assertSame(java.lang.Object expected,
java.lang.Object actual)
Asserts that two objects refer to the same object. |
static void |
assertSame(java.lang.String message,
java.lang.Object expected,
java.lang.Object actual)
Asserts that two objects refer to the same object. |
static void |
fail()
Fails a test with no message. |
static void |
fail(java.lang.String message)
Fails a test with the given message. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static void assert(java.lang.String message, boolean condition)
public static void assert(boolean condition)
public static void assertEquals(double expected, double actual, double delta)
expected
- the expected value of an objectactual
- the actual value of an objectdelta
- tolerated deltapublic static void assertEquals(long expected, long actual)
expected
- the expected value of an objectactual
- the actual value of an objectpublic static void assertEquals(java.lang.Object expected, java.lang.Object actual)
expected
- the expected value of an objectactual
- the actual value of an objectpublic static void assertEquals(java.lang.String message, double expected, double actual, double delta)
message
- the detail message for this assertionexpected
- the expected value of an objectactual
- the actual value of an objectdelta
- tolerated deltapublic static void assertEquals(java.lang.String message, long expected, long actual)
message
- the detail message for this assertionexpected
- the expected value of an objectactual
- the actual value of an objectpublic static void assertEquals(java.lang.String message, java.lang.Object expected, java.lang.Object actual)
message
- the detail message for this assertionexpected
- the expected value of an objectactual
- the actual value of an objectpublic static void assertNotNull(java.lang.Object object)
public static void assertNotNull(java.lang.String message, java.lang.Object object)
public static void assertNull(java.lang.Object object)
public static void assertNull(java.lang.String message, java.lang.Object object)
public static void assertSame(java.lang.Object expected, java.lang.Object actual)
expected
- the expected value of an objectactual
- the actual value of an objectpublic static void assertSame(java.lang.String message, java.lang.Object expected, java.lang.Object actual)
message
- the detail message for this assertionexpected
- the expected value of an objectactual
- the actual value of an objectpublic static void fail()
public static void fail(java.lang.String message)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |