|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Factory | |
|---|---|
| org.hamcrest.core | Fundamental matchers of objects and values, and composite matchers. |
| Uses of Factory in org.hamcrest.core |
|---|
| Methods in org.hamcrest.core with annotations of type Factory | ||
|---|---|---|
static
|
AllOf.allOf(java.lang.Iterable<Matcher<? super T>> matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true. |
|
static
|
AllOf.allOf(Matcher<? super T>... matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true. |
|
static
|
AllOf.allOf(Matcher<? super T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true. |
|
static
|
AllOf.allOf(Matcher<? super T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true. |
|
static
|
AllOf.allOf(Matcher<? super T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true. |
|
static
|
AllOf.allOf(Matcher<? super T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true. |
|
static
|
AllOf.allOf(Matcher<? super T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true. |
|
static
|
IsInstanceOf.any(java.lang.Class<T> type)
Is the value an instance of a particular type? |
|
static
|
AnyOf.anyOf(java.lang.Iterable<Matcher<? super T>> matchers)
Evaluates to true if ANY of the passed in matchers evaluate to true. |
|
static
|
AnyOf.anyOf(Matcher<? super T>... matchers)
Evaluates to true if ANY of the passed in matchers evaluate to true. |
|
static
|
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true if ANY of the passed in matchers evaluate to true. |
|
static
|
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true. |
|
static
|
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true. |
|
static
|
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true. |
|
static
|
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true. |
|
static Matcher<java.lang.Object> |
IsAnything.anything()
This matcher always evaluates to true. |
|
static Matcher<java.lang.Object> |
IsAnything.anything(java.lang.String description)
This matcher always evaluates to true. |
|
static
|
CombinableMatcher.both(Matcher<? super LHS> matcher)
This is useful for fluently combining matchers that must both pass. |
|
static Matcher<java.lang.String> |
StringContains.containsString(java.lang.String substring)
|
|
static
|
DescribedAs.describedAs(java.lang.String description,
Matcher<T> matcher,
java.lang.Object... values)
Wraps an existing matcher and overrides the description when it fails. |
|
static
|
CombinableMatcher.either(Matcher<? super LHS> matcher)
This is useful for fluently combining matchers where either may pass, for example: assertThat(string, both(containsString("a")).and(containsString("b"))); |
|
static Matcher<java.lang.String> |
StringEndsWith.endsWith(java.lang.String substring)
|
|
static
|
IsEqual.equalTo(T operand)
Is the value equal to another value, as tested by the Object.equals(java.lang.Object) invokedMethod? |
|
static
|
Every.everyItem(Matcher<U> itemMatcher)
|
|
static
|
IsCollectionContaining.hasItem(Matcher<? super T> elementMatcher)
|
|
static
|
IsCollectionContaining.hasItem(T element)
|
|
static
|
IsCollectionContaining.hasItems(Matcher<? super T>... elementMatchers)
|
|
static
|
IsCollectionContaining.hasItems(T... elements)
|
|
static
|
IsInstanceOf.instanceOf(java.lang.Class<?> type)
Is the value an instance of a particular type? |
|
static
|
Is.is(java.lang.Class<T> type)
Deprecated. use isA(Class |
|
static
|
Is.is(Matcher<T> matcher)
Decorates another Matcher, retaining the behavior but allowing tests to be slightly more expressive. |
|
static
|
Is.is(T value)
This is a shortcut to the frequently used is(equalTo(x)). |
|
static
|
Is.isA(java.lang.Class<T> type)
Deprecated. |
|
static
|
IsNot.not(Matcher<T> matcher)
Inverts the rule. |
|
static
|
IsNot.not(T value)
This is a shortcut to the frequently used not(equalTo(x)). |
|
static Matcher<java.lang.Object> |
IsNull.notNullValue()
Matches if value is not null. |
|
static
|
IsNull.notNullValue(java.lang.Class<T> type)
Matches if value is not null. |
|
static Matcher<java.lang.Object> |
IsNull.nullValue()
Matches if value is null. |
|
static
|
IsNull.nullValue(java.lang.Class<T> type)
Matches if value is null. |
|
static
|
IsSame.sameInstance(T object)
Creates a new instance of IsSame |
|
static Matcher<java.lang.String> |
StringStartsWith.startsWith(java.lang.String substring)
|
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||