|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockftpserver.core.util.Assert
public final class Assert
Provides static helper methods to make runtime assertions. Throws an
AssertFailedException when the assertion fails. All methods are static.
| Method Summary | |
|---|---|
static void |
isFalse(boolean condition,
String message)
Verify that condition is false. |
static void |
isNull(Object arg,
String argName)
Verify that arg is null. |
static void |
isTrue(boolean condition,
String message)
Verify that condition is true. |
static void |
notNull(Object arg,
String argName)
Verify that arg is not null. |
static void |
notNullOrEmpty(Collection collection,
String argName)
Verify that the collection is not null or empty. |
static void |
notNullOrEmpty(Map map,
String argName)
Verify that the Map is not null or empty. |
static void |
notNullOrEmpty(Object[] array,
String argName)
Verify that the array is not null or empty. |
static void |
notNullOrEmpty(String string,
String argName)
Verify that the String is not null or empty. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void isNull(Object arg,
String argName)
arg - - the method parameter valueargName - - the name of the parameter; used in the exception message
AssertFailedException - - if arg is not null
public static void notNull(Object arg,
String argName)
arg - - the method parameter valueargName - - the name of the parameter; used in the exception message
AssertFailedException - - if arg is null
public static void isTrue(boolean condition,
String message)
condition - - the condition that should be true
AssertFailedException - - if condition is false
public static void isFalse(boolean condition,
String message)
condition - - the condition that should be false
AssertFailedException - - if condition is true
public static void notNullOrEmpty(Collection collection,
String argName)
collection - - the CollectionargName - - the name of the parameter; used in the exception message
AssertFailedException - - if collection is null or empty
public static void notNullOrEmpty(Map map,
String argName)
map - - the MapargName - - the name of the parameter; used in the exception message
AssertFailedException - - if map is null or empty
public static void notNullOrEmpty(Object[] array,
String argName)
array - - the arrayargName - - the name of the parameter; used in the exception message
AssertFailedException - - if array is null or empty
public static void notNullOrEmpty(String string,
String argName)
string - - the StringargName - - the name of the parameter; used in the exception message
AssertFailedException - - if string is null or empty
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||