netwar.utils
Class Assert
java.lang.Object
|
+--netwar.utils.Assert
- public class Assert
- extends java.lang.Object
Class Assert
Used to test assertions.
- Author:
- Kyle Kakligian
|
Method Summary |
static void |
notFalse(boolean b)
Throws an IllegalArgumentException if the given parameter is false. |
static void |
notFalse(boolean b,
java.lang.String s)
Throws an IllegalArgumentException if the given parameter is false. |
static void |
notNull(java.lang.Object obj)
Throws an IllegalArgumentException if the given parameter is null. |
static void |
notNull(java.lang.Object obj,
java.lang.String s)
Throws an IllegalArgumentException if the given parameter is null. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Assert
public Assert()
notFalse
public static void notFalse(boolean b)
throws java.lang.IllegalArgumentException
- Throws an IllegalArgumentException if the given parameter is
false.
- Parameters:
b - The test variable.- Throws:
java.lang.IllegalArgumentException - This gets thrown if b is false.
notNull
public static void notNull(java.lang.Object obj)
throws java.lang.IllegalArgumentException
- Throws an IllegalArgumentException if the given parameter is
null.
- Parameters:
obj - Object reference to test.- Throws:
java.lang.IllegalArgumentException - This gets thrown if obj is null.
notFalse
public static void notFalse(boolean b,
java.lang.String s)
throws java.lang.IllegalArgumentException
- Throws an IllegalArgumentException if the given parameter is
false. The string should be an explaination.
- Parameters:
b - The test variable.s - This gives an explaination as to why b is false.- Throws:
java.lang.IllegalArgumentException - This gets thrown if b is false.
notNull
public static void notNull(java.lang.Object obj,
java.lang.String s)
throws java.lang.IllegalArgumentException
- Throws an IllegalArgumentException if the given parameter is
null. The string should be an explaination.
- Parameters:
obj - Object reference to test.s - This gives an explaination as to why b is null.- Throws:
java.lang.IllegalArgumentException - This gets thrown if obj is null.