|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.commons.testing.AssertUtils
public class AssertUtils
A collection of assertion helper to make UT easier to read
| Method Summary | ||
|---|---|---|
static
|
assertContains(Collection<T> actual,
T... expected)
Assert a set of expected items to be all contained in a collection |
|
static void |
assertContains(List<String> actual,
String... expected)
Assert a set of expected string items to be all contained in a collection |
|
static void |
assertContains(String[] actual,
String... expected)
Assert a set of expected string items to be all contained in a string array |
|
static void |
assertContainsAll(String message,
List<String> expected,
List<String> actual)
All elements of a list should be contained in the expected array of String |
|
static void |
assertEmpty(Collection value)
Assert a collection is empty (not null) |
|
static
|
assertEmpty(T[] value)
|
|
static void |
assertEquals(String message,
String[] expected,
String[] actual)
Assertion method on string arrays |
|
static void |
assertException(Class<? extends Exception> exceptionType,
Closure code)
Assert an exception of a given type is thrown by he code in closure |
|
static void |
assertException(Closure code)
|
|
static
|
assertNotContains(Collection<T> actual,
T... expected)
Assert a set of expected items NOT to be all contained in a collection |
|
static void |
assertNotContains(List<String> actual,
String... expected)
Assert a set of expected string items NOT to be all contained in a collection |
|
static
|
assertNotEmpty(Collection<T> value)
Assert a collection is not empty and not null |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> void assertContains(Collection<T> actual,
T... expected)
actual - containmentexpected - items expected to be contained
public static <T> void assertNotContains(Collection<T> actual,
T... expected)
actual - containmentexpected - items expected to be contained
public static void assertContains(List<String> actual,
String... expected)
actual - containmentexpected - items expected to be contained
public static void assertContains(String[] actual,
String... expected)
actual - containmentexpected - items expected to be contained
public static void assertNotContains(List<String> actual,
String... expected)
actual - containmentexpected - items expected to be containedpublic static void assertEmpty(Collection value)
value - public static <T> void assertNotEmpty(Collection<T> value)
T - value - public static <T> void assertEmpty(T[] value)
public static void assertContainsAll(String message,
List<String> expected,
List<String> actual)
message - expected - actual -
public static void assertEquals(String message,
String[] expected,
String[] actual)
message - expected - actual - public static void assertException(Closure code)
public static void assertException(Class<? extends Exception> exceptionType,
Closure code)
exceptionType - code -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||