public interface ObjectFluent<Value,BaseFluent,TheFluent extends BaseFluent,This extends ObjectFluent<Value,BaseFluent,TheFluent,This>> extends org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value,BaseFluent,TheFluent,This>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ObjectFluent.AndChain<Value,TheFluent,This extends ObjectFluent.AndChain<Value,TheFluent,This>> |
static class |
ObjectFluent.Assert<Value> |
static interface |
ObjectFluent.OrChain<Value,TheFluent,This extends ObjectFluent.OrChain<Value,TheFluent,This>> |
static class |
ObjectFluent.Step<Value,TheFluent,This extends ObjectFluent.Step<Value,TheFluent,This>> |
| Modifier and Type | Method and Description |
|---|---|
ObjectFluent.AndChain<Value,TheFluent,?> |
all() |
ObjectFluent.AndChain<Value,TheFluent,?> |
both() |
ObjectFluent.AndChain<Value,TheFluent,?> |
both(org.hamcrest.Matcher<? super Value> matcher) |
ObjectFluent.OrChain<Value,TheFluent,?> |
either() |
ObjectFluent.OrChain<Value,TheFluent,?> |
either(org.hamcrest.Matcher<? super Value> matcher) |
default <Property> ObjectFluent.Step<Property,TheFluent,?> |
get(org.cthul.matchers.fluent.adapters.Getter<Value,Property> getter) |
default <Property> ObjectFluent.Step<Property,TheFluent,?> |
get(String name,
org.cthul.matchers.fluent.adapters.Getter<Value,Property> getter) |
default TheFluent |
hasToString(org.hamcrest.Matcher<? super String> toStringMatcher)
Creates a matcher that matches any examined object whose
toString method
returns a value that satisfies the specified matcher. |
default TheFluent |
hasToString(String expectedToString)
Creates a matcher that matches any examined object whose
toString method
returns a value equalTo the specified string. |
default TheFluent |
isIn(Collection<Value> collection)
Creates a matcher that matches when the examined object is found within the
specified collection.
|
default TheFluent |
isIn(Value[] elements)
Creates a matcher that matches when the examined object is found within the
specified array.
|
default TheFluent |
isOneOf(Value... elements)
Creates a matcher that matches when the examined object is equal to one of the
specified elements.
|
default TheFluent |
notNullValue()
A shortcut to the frequently used
not(nullValue()). |
default TheFluent |
nullValue()
Creates a matcher that matches if examined object is
null. |
default TheFluent |
sameInstance(Value target)
Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
|
default TheFluent |
theInstance(Value target)
Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
|
__, __, __, 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 nullValue()
null.
For example:
assertThat(cheese, is(nullValue())
IsNull.nullValue()default TheFluent notNullValue()
not(nullValue()).
For example:
assertThat(cheese, is(notNullValue()))instead of:
assertThat(cheese, is(not(nullValue())))
IsNull.notNullValue()default TheFluent sameInstance(Value target)
target - the target instance against which others should be assessedIsSame.sameInstance(java.lang.Object)default TheFluent theInstance(Value target)
target - the target instance against which others should be assessedIsSame.theInstance(java.lang.Object)default TheFluent isIn(Collection<Value> collection)
For example:
assertThat("foo", isIn(Arrays.asList("bar", "foo")))collection - the collection in which matching items must be foundIsIn.isIn(java.util.Collection)default TheFluent isIn(Value[] elements)
For example:
assertThat("foo", isIn(new String[]{"bar", "foo"}))elements - the array in which matching items must be foundIsIn.isIn(java.lang.Object[])default TheFluent isOneOf(Value... elements)
For example:
assertThat("foo", isIn("bar", "foo"))elements - the elements amongst which matching items will be foundIsIn.isOneOf(java.lang.Object...)default TheFluent hasToString(org.hamcrest.Matcher<? super String> toStringMatcher)
toString method
returns a value that satisfies the specified matcher.
For example:
assertThat(true, hasToString(equalTo("TRUE")))toStringMatcher - the matcher used to verify the toString resultHasToString.hasToString(org.hamcrest.Matcher)default TheFluent hasToString(String expectedToString)
toString method
returns a value equalTo the specified string.
For example:
assertThat(true, hasToString("TRUE"))expectedToString - the expected toString resultHasToString.hasToString(java.lang.String)default <Property> ObjectFluent.Step<Property,TheFluent,?> get(String name, org.cthul.matchers.fluent.adapters.Getter<Value,Property> getter)
LambdaAdapter.get(java.lang.String,org.cthul.matchers.fluent.adapters.Getter)default <Property> ObjectFluent.Step<Property,TheFluent,?> get(org.cthul.matchers.fluent.adapters.Getter<Value,Property> getter)
LambdaAdapter.get(org.cthul.matchers.fluent.adapters.Getter)ObjectFluent.OrChain<Value,TheFluent,?> either()
either in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value,BaseFluent,TheFluent extends BaseFluent,This extends ObjectFluent<Value,BaseFluent,TheFluent,This>>either in interface org.cthul.matchers.fluent.FluentStep<Value,BaseFluent>ObjectFluent.OrChain<Value,TheFluent,?> either(org.hamcrest.Matcher<? super Value> matcher)
either in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value,BaseFluent,TheFluent extends BaseFluent,This extends ObjectFluent<Value,BaseFluent,TheFluent,This>>either in interface org.cthul.matchers.fluent.FluentStep<Value,BaseFluent>ObjectFluent.AndChain<Value,TheFluent,?> both()
both in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value,BaseFluent,TheFluent extends BaseFluent,This extends ObjectFluent<Value,BaseFluent,TheFluent,This>>both in interface org.cthul.matchers.fluent.FluentStep<Value,BaseFluent>ObjectFluent.AndChain<Value,TheFluent,?> both(org.hamcrest.Matcher<? super Value> matcher)
both in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value,BaseFluent,TheFluent extends BaseFluent,This extends ObjectFluent<Value,BaseFluent,TheFluent,This>>both in interface org.cthul.matchers.fluent.FluentStep<Value,BaseFluent>ObjectFluent.AndChain<Value,TheFluent,?> all()
all in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value,BaseFluent,TheFluent extends BaseFluent,This extends ObjectFluent<Value,BaseFluent,TheFluent,This>>all in interface org.cthul.matchers.fluent.FluentStep<Value,BaseFluent>Copyright © 2015. All Rights Reserved.