public abstract class Assert extends Object
Abstract class to provide the following to framework:
Constructor and Description |
---|
Assert() |
Modifier and Type | Method and Description |
---|---|
static void |
hasLength(String input,
int length,
String message)
Asserts that a String is not null and of a certain length
|
static void |
hasSize(Collection input,
int length,
String message)
Asserts that a Collection is not null and of a certain size
|
static void |
isTrue(boolean condition,
String message)
Asserts that a condition is true
|
static void |
notNull(Object object,
String message)
Asserts that an object is not null
|
public static void isTrue(boolean condition, String message)
Asserts that a condition is true
condition
- The condition under testmessage
- The message for any exceptionpublic static void notNull(Object object, String message)
Asserts that an object is not null
object
- The object under testmessage
- The message for any exceptionpublic static void hasLength(String input, int length, String message)
input
- The input under testmessage
- The message for any exceptionpublic static void hasSize(Collection input, int length, String message)
input
- The input under testmessage
- The message for any exceptionCopyright © 2012–2017 Xeiam, LLC. All rights reserved.