|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.tum.cs.commons.assertion.CCSMAssert
public class CCSMAssert
This class provides simple methods to implement assertions. Please refer to the package documentation for a discussion of assertions vs preconditions.
| Constructor Summary | |
|---|---|
CCSMAssert()
|
|
| Method Summary | |
|---|---|
static void |
fail(String message)
|
static void |
isFalse(boolean condition,
String message)
Checks if a condition is false. |
static void |
isInstanceOf(Object object,
Class<?> clazz)
Checks that the object is a instance of the class |
static void |
isNotNull(Object reference)
Checks whether a reference is null. |
static void |
isNotNull(Object reference,
String message)
Checks whether a reference is null. |
static void |
isTrue(boolean condition,
String message)
Checks if a condition is true. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CCSMAssert()
| Method Detail |
|---|
public static void isTrue(boolean condition,
String message)
throws AssertionError
true.
condition - condition to checkmessage - exception message
AssertionError - if the condition if false
public static void isFalse(boolean condition,
String message)
throws AssertionError
false.
condition - condition to checkmessage - exception message
AssertionError - if the condition if true
public static void isInstanceOf(Object object,
Class<?> clazz)
public static void fail(String message)
throws AssertionError
AssertionError - with message
public static void isNotNull(Object reference)
throws AssertionError
null.
reference - reference to check
AssertionError - if the reference is null
public static void isNotNull(Object reference,
String message)
throws AssertionError
null.
reference - reference to checkmessage - exception message
AssertionError - if the reference is null
|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||