public class AssertUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
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 <T> void |
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 <T> void |
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 <T> void |
assertNotEmpty(Collection<T> value)
Assert a collection is not empty and not null
|
public static <T> void assertContains(Collection<T> actual, T... expected)
actual - containmentexpected - items expected to be containedpublic static <T> void assertNotContains(Collection<T> actual, T... expected)
actual - containmentexpected - items expected to be containedpublic static void assertContains(List<String> actual, String... expected)
actual - containmentexpected - items expected to be containedpublic static void assertContains(String[] actual, String... expected)
actual - containmentexpected - items expected to be containedpublic 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)
Copyright © 2003–2021 eXo Platform SAS. All rights reserved.