public interface CollectionFluent<T,Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>> extends org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value,BaseFluent,TheFluent,This>, IterableFluent<T,Value,BaseFluent,TheFluent,This>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CollectionFluent.AndChain<T,Value extends Collection<T>,TheFluent,This extends CollectionFluent.AndChain<T,Value,TheFluent,This>> |
static class |
CollectionFluent.Assert<T,Value extends Collection<T>> |
static interface |
CollectionFluent.OrChain<T,Value extends Collection<T>,TheFluent,This extends CollectionFluent.OrChain<T,Value,TheFluent,This>> |
static class |
CollectionFluent.Step<T,Value extends Collection<T>,TheFluent,This extends CollectionFluent.Step<T,Value,TheFluent,This>> |
| Modifier and Type | Method and Description |
|---|---|
CollectionFluent.AndChain<T,Value,TheFluent,?> |
all() |
CollectionFluent.AndChain<T,Value,TheFluent,?> |
both() |
CollectionFluent.AndChain<T,Value,TheFluent,?> |
both(org.hamcrest.Matcher<? super Value> matcher) |
CollectionFluent.OrChain<T,Value,TheFluent,?> |
either() |
CollectionFluent.OrChain<T,Value,TheFluent,?> |
either(org.hamcrest.Matcher<? super Value> matcher) |
default TheFluent |
empty()
|
default TheFluent |
hasItem(org.hamcrest.Matcher<? super T> itemMatcher)
|
default TheFluent |
hasItem(T item)
|
default TheFluent |
hasItems(org.hamcrest.Matcher<? super T>... itemMatchers)
|
default TheFluent |
hasItems(T... items)
|
default TheFluent |
hasSize(int size)
Creates a matcher for
Collections that matches when the size() method returns
a value equal to the specified size. |
any, anyBoolean, anyDouble, anyInt, anyLong, anyString, contains, contains, contains, contains, containsInAnyOrder, containsInAnyOrder, containsInAnyOrder, each, eachBoolean, eachDouble, eachInt, eachLong, eachString, sizeget, get, hasToString, hasToString, isIn, isIn, isOneOf, notNullValue, nullValue, sameInstance, theInstance__, __, __, allOf, anyOf, as, as, equalTo, has, has, has, has, hasNot, hasNot, hasNot, hasNot, hasType, is, is, is, isA, isNot, isNot, isNot, noneOf, not, not, not, not, notdefault TheFluent hasItem(org.hamcrest.Matcher<? super T> itemMatcher)
Iterables that only matches when a single pass over the
examined Iterable yields at least one item that is matched by the specified
itemMatcher. Whilst matching, the traversal of the examined Iterable
will stop as soon as a matching item is found.
For example:
assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))itemMatcher - the matcher to apply to items provided by the examined IterableIsCollectionContaining.hasItem(org.hamcrest.Matcher)default TheFluent hasItem(T item)
Iterables that only matches when a single pass over the
examined Iterable yields at least one item that is equal to the specified
item. Whilst matching, the traversal of the examined Iterable
will stop as soon as a matching item is found.
For example:
assertThat(Arrays.asList("foo", "bar"), hasItem("bar"))item - the item to compare against the items provided by the examined IterableIsCollectionContaining.hasItem(java.lang.Object)default TheFluent hasItems(org.hamcrest.Matcher<? super T>... itemMatchers)
Iterables that matches when consecutive passes over the
examined Iterable yield at least one item that is matched by the corresponding
matcher from the specified itemMatchers. Whilst matching, each traversal of
the examined Iterable will stop as soon as a matching item is found.
For example:
assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))itemMatchers - the matchers to apply to items provided by the examined IterableIsCollectionContaining.hasItems(org.hamcrest.Matcher...)default TheFluent hasItems(T... items)
Iterables that matches when consecutive passes over the
examined Iterable yield at least one item that is equal to the corresponding
item from the specified items. Whilst matching, each traversal of the
examined Iterable will stop as soon as a matching item is found.
For example:
assertThat(Arrays.asList("foo", "bar", "baz"), hasItems("baz", "foo"))items - the items to compare against the items provided by the examined IterableIsCollectionContaining.hasItems(java.lang.Object...)default TheFluent hasSize(int size)
Collections that matches when the size() method returns
a value equal to the specified size.
For example:
assertThat(Arrays.asList("foo", "bar"), hasSize(2))hasSize in interface IterableFluent<T,Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>size - the expected size of an examined CollectionIsCollectionWithSize.hasSize(int)default TheFluent empty()
Collections matching examined collections whose isEmpty
method returns true.
For example:
assertThat(new ArrayList<String>(), is(empty()))
empty in interface IterableFluent<T,Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>IsEmptyCollection.empty()CollectionFluent.OrChain<T,Value,TheFluent,?> either()
either in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>either in interface org.cthul.matchers.fluent.FluentStep<Value extends Collection<T>,BaseFluent>either in interface IterableFluent<T,Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>either in interface ObjectFluent<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>CollectionFluent.OrChain<T,Value,TheFluent,?> either(org.hamcrest.Matcher<? super Value> matcher)
either in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>either in interface org.cthul.matchers.fluent.FluentStep<Value extends Collection<T>,BaseFluent>either in interface IterableFluent<T,Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>either in interface ObjectFluent<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>CollectionFluent.AndChain<T,Value,TheFluent,?> both()
both in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>both in interface org.cthul.matchers.fluent.FluentStep<Value extends Collection<T>,BaseFluent>both in interface IterableFluent<T,Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>both in interface ObjectFluent<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>CollectionFluent.AndChain<T,Value,TheFluent,?> both(org.hamcrest.Matcher<? super Value> matcher)
both in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>both in interface org.cthul.matchers.fluent.FluentStep<Value extends Collection<T>,BaseFluent>both in interface IterableFluent<T,Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>both in interface ObjectFluent<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>CollectionFluent.AndChain<T,Value,TheFluent,?> all()
all in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>all in interface org.cthul.matchers.fluent.FluentStep<Value extends Collection<T>,BaseFluent>all in interface IterableFluent<T,Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>all in interface ObjectFluent<Value extends Collection<T>,BaseFluent,TheFluent extends BaseFluent,This extends CollectionFluent<T,Value,BaseFluent,TheFluent,This>>Copyright © 2015. All Rights Reserved.