public class ValidationUtils
extends java.lang.Object
Constructor and Description |
---|
ValidationUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
assertEquals(java.lang.Object obj1,
java.lang.Object obj2)
Assert that
obj1 is equal to obj2 . |
static void |
assertEquals(java.lang.Object obj1,
java.lang.Object obj2,
java.lang.RuntimeException error)
Assert that
obj1 is equal to obj2 . |
static void |
assertEquals(java.lang.Object obj1,
java.lang.Object obj2,
java.lang.String message)
Assert that
obj1 is equal to obj2 . |
static void |
assertFalse(boolean value)
assert that
value is false . |
static void |
assertFalse(boolean value,
java.lang.RuntimeException th)
assert that
value is false . |
static void |
assertFalse(boolean value,
java.lang.String message)
assert that
value is false . |
static void |
assertNotEquals(java.lang.Object obj1,
java.lang.Object obj2)
Assert that
obj1 is not equal to obj2 . |
static void |
assertNotEquals(java.lang.Object obj1,
java.lang.Object obj2,
java.lang.RuntimeException error)
Assert that
obj1 is not equal to obj2 . |
static void |
assertNotEquals(java.lang.Object obj1,
java.lang.Object obj2,
java.lang.String message)
Assert that
obj1 is not equal to obj2 . |
static void |
assertNotNull(java.lang.Object obj)
assert that
obj is not null. |
static void |
assertNotNull(java.lang.Object obj,
java.lang.RuntimeException error)
assert that
obj is not null. |
static void |
assertNotNull(java.lang.Object obj,
java.lang.String message)
assert that
obj is not null. |
static void |
assertNull(java.lang.Object obj)
assert that
obj is null. |
static void |
assertNull(java.lang.Object obj,
java.lang.RuntimeException error)
assert that
obj is null. |
static void |
assertNull(java.lang.Object obj,
java.lang.String message)
assert that
obj is null. |
static void |
assertTrue(boolean value)
assert that
value is true . |
static void |
assertTrue(boolean value,
java.lang.RuntimeException th)
assert that
value is true . |
static void |
assertTrue(boolean value,
java.lang.String message)
assert that
value is true . |
public static void assertTrue(boolean value, java.lang.RuntimeException th)
value
is true
.
throw th
if not true
.
value
- value to checkth
- exception to throwpublic static void assertTrue(boolean value, java.lang.String message)
value
is true
.
throw AssertionError
containing @{code message} if not true
.
value
- value to checkmessage
- message which exception containspublic static void assertTrue(boolean value)
value
is true
.
throw AssertionError
if not true
.
value
- value to checkpublic static void assertFalse(boolean value, java.lang.RuntimeException th)
value
is false
.
throw th
if not false
.
value
- value to checkth
- exception to throwpublic static void assertFalse(boolean value, java.lang.String message)
value
is false
.
throw AssertionError
containing @{code message} if not false
.
value
- value to checkmessage
- message which exception containspublic static void assertFalse(boolean value)
value
is false
.
throw AssertionError
if not false
.
value
- value to checkpublic static void assertNull(java.lang.Object obj, java.lang.RuntimeException error)
obj
is null.
throw th
if obj
is not null
obj
- object to checkerror
- exception to throwpublic static void assertNull(java.lang.Object obj, java.lang.String message)
obj
is null.
throw AssertionError
containing message
if obj
is not null.
obj
- object to checkmessage
- message which exception containspublic static void assertNull(java.lang.Object obj)
obj
is null.
throw AssertionError
if obj
is not null.
obj
- object to checkpublic static void assertNotNull(java.lang.Object obj, java.lang.RuntimeException error)
obj
is not null.
throw error
if obj
is null.
obj
- object to checkerror
- exception to throwpublic static void assertNotNull(java.lang.Object obj, java.lang.String message)
obj
is not null.
throw AssertionError
containing message
if obj
is null.
obj
- object to checkmessage
- message which exception containspublic static void assertNotNull(java.lang.Object obj)
obj
is not null.
throw AssertionError
if obj
is null.
obj
- object to checkpublic static void assertEquals(java.lang.Object obj1, java.lang.Object obj2, java.lang.RuntimeException error)
obj1
is equal to obj2
.
throw error
if obj1
is not equal to obj2
.
obj1
- object1 to checkobj2
- object2 to checkerror
- exception to throwpublic static void assertEquals(java.lang.Object obj1, java.lang.Object obj2, java.lang.String message)
obj1
is equal to obj2
.
throw AssertionError
containing message
if obj1
is not equal to
obj2
.
obj1
- object1 to checkobj2
- object2 to checkmessage
- message which exception containspublic static void assertEquals(java.lang.Object obj1, java.lang.Object obj2)
obj1
is equal to obj2
.
throw AssertionError
if obj1
is not equal to obj2
.
obj1
- object1 to checkobj2
- object2 to checkpublic static void assertNotEquals(java.lang.Object obj1, java.lang.Object obj2, java.lang.RuntimeException error)
obj1
is not equal to obj2
.
throw error
if obj1
is equal to obj2
.
obj1
- object1 to checkobj2
- object2 to checkerror
- exception to throwpublic static void assertNotEquals(java.lang.Object obj1, java.lang.Object obj2, java.lang.String message)
obj1
is not equal to obj2
.
throw AssertionError
containing message
if obj1
is equal to
obj2
.
obj1
- object1 to checkobj2
- object2 to checkmessage
- message which exception containspublic static void assertNotEquals(java.lang.Object obj1, java.lang.Object obj2)
obj1
is not equal to obj2
.
throw AssertionError
if obj1
is equal to obj2
.
obj1
- object1 to checkobj2
- object2 to check