public final class CollectionChecks extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Check<T[]> |
array(Check<Iterator<T>> check) |
static <T> Check<BlockingQueue<T>> |
blockingQueue(Check<Iterator<T>> check,
Duration timeout) |
static <T> Check<Iterable<T>> |
collection(Check<Iterator<T>> check) |
static <T> Check<Iterator<T>> |
contains(Iterable<Check<? super T>> prefix) |
static <D> Check<Collection<D>> |
containsAll(Collection<D> items) |
static <D> Check<Collection<D>> |
containsAll(D... items) |
static <T> Check<Iterator<T>> |
containsInAnyOrder(Collection<Check<? super T>> prefix) |
static <D> Check<Collection<D>> |
emptyCollection()
Create matcher of empty collection.
|
static <T> Check<Iterator<T>> |
equalInAnyOrderTo(Collection<Check<? super T>> prefix) |
static <T> Check<Iterator<T>> |
equalTo(Iterable<Check<? super T>> prefix) |
static <D> Check<Iterable<D>> |
every(String elementName,
Check<? super D> check) |
static <D> Check<Iterable<D>> |
exists(String elementName,
Check<? super D> check) |
static <D> Check<Collection<D>> |
hasSize(int size)
Create matcher of collection size.
|
static <T> Collection<Check<? super T>> |
items(T... expectedValues) |
static <T> Collection<Check<? super T>> |
itemsMatching(Check<? super T>... expectedValues) |
static <K,V> Check<Map<K,V>> |
mapHas(K key,
Check<? super V> check) |
static <T> Check<Queue<T>> |
queue(Check<Iterator<T>> check) |
static <D> Check<D> |
repeatMax(Check<D> itemCheck,
int max) |
static <D> Check<D> |
repeatMax(Check<D> itemCheck,
int max,
Duration delay) |
static <T> Check<Iterator<T>> |
startsInAnyOrderWith(Collection<Check<? super T>> prefix) |
static <T> Check<Iterator<T>> |
startsWith(Iterable<Check<? super T>> prefix) |
static <D> Check<Collection<D>> |
subsetOf(Collection<D> superSet)
Create matcher, that matches if tested collection meets subset of provided superset.
|
static <D> Check<Collection<D>> |
subsetOf(D... superSet)
Create matcher, that matches if tested collection meets subset of provided superset.
|
@SafeVarargs public static <T> Collection<Check<? super T>> items(T... expectedValues)
@SafeVarargs public static <T> Collection<Check<? super T>> itemsMatching(Check<? super T>... expectedValues)
public static <T> Check<Iterator<T>> startsInAnyOrderWith(Collection<Check<? super T>> prefix)
public static <T> Check<Iterator<T>> containsInAnyOrder(Collection<Check<? super T>> prefix)
public static <T> Check<Iterator<T>> equalInAnyOrderTo(Collection<Check<? super T>> prefix)
public static <T> Check<BlockingQueue<T>> blockingQueue(Check<Iterator<T>> check, Duration timeout)
public static <D> Check<Collection<D>> emptyCollection()
D - Type of the items in the collection to be tested.public static <D> Check<Collection<D>> subsetOf(Collection<D> superSet)
D - Type of the items in the collection to be tested.superSet - Superset of expected items.@SafeVarargs public static <D> Check<Collection<D>> subsetOf(D... superSet)
D - Type of the items in the collection to be tested.superSet - Superset of expected items.public static <D> Check<Collection<D>> hasSize(int size)
D - Type of the items in the collection to be tested.size - Expected size of the collection.public static <D> Check<Collection<D>> containsAll(Collection<D> items)
@SafeVarargs public static <D> Check<Collection<D>> containsAll(D... items)
Copyright © 2019. All rights reserved.