|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.junit.matchers.JUnitMatchers
public class JUnitMatchers
Convenience import class: these are useful matchers for use with the assertThat method, but they are not currently included in the basic CoreMatchers class from hamcrest.
Constructor Summary | |
---|---|
JUnitMatchers()
|
Method Summary | ||
---|---|---|
static
|
both(Matcher<? super T> matcher)
Deprecated. Please use CoreMatchers.both(Matcher) instead. |
|
static Matcher<String> |
containsString(String substring)
Deprecated. Please use CoreMatchers.containsString(String) instead. |
|
static
|
either(Matcher<? super T> matcher)
Deprecated. Please use CoreMatchers.either(Matcher) instead. |
|
static
|
everyItem(Matcher<T> elementMatcher)
Deprecated. Please use CoreMatchers.everyItem(Matcher) instead. |
|
static
|
hasItem(Matcher<? super T> elementMatcher)
Deprecated. Please use CoreMatchers.hasItem(Matcher) instead. |
|
static
|
hasItem(T element)
Deprecated. Please use CoreMatchers.hasItem(Object) instead. |
|
static
|
hasItems(Matcher<? super T>... elementMatchers)
Deprecated. Please use CoreMatchers.hasItems(Matcher...) instead. |
|
static
|
hasItems(T... elements)
Deprecated. Please use CoreMatchers.hasItems(Object...) instead. |
|
static
|
isException(Matcher<T> exceptionMatcher)
|
|
static
|
isThrowable(Matcher<T> throwableMatcher)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JUnitMatchers()
Method Detail |
---|
@Deprecated public static <T> Matcher<Iterable<? super T>> hasItem(T element)
CoreMatchers.hasItem(Object)
instead.
@Deprecated public static <T> Matcher<Iterable<? super T>> hasItem(Matcher<? super T> elementMatcher)
CoreMatchers.hasItem(Matcher)
instead.
@Deprecated public static <T> Matcher<Iterable<T>> hasItems(T... elements)
CoreMatchers.hasItems(Object...)
instead.
@Deprecated public static <T> Matcher<Iterable<T>> hasItems(Matcher<? super T>... elementMatchers)
CoreMatchers.hasItems(Matcher...)
instead.
@Deprecated public static <T> Matcher<Iterable<T>> everyItem(Matcher<T> elementMatcher)
CoreMatchers.everyItem(Matcher)
instead.
@Deprecated public static Matcher<String> containsString(String substring)
CoreMatchers.containsString(String)
instead.
@Deprecated public static <T> CombinableMatcher.CombinableBothMatcher<T> both(Matcher<? super T> matcher)
CoreMatchers.both(Matcher)
instead.
assertThat(string, both(containsString("a")).and(containsString("b")));
@Deprecated public static <T> CombinableMatcher.CombinableEitherMatcher<T> either(Matcher<? super T> matcher)
CoreMatchers.either(Matcher)
instead.
assertThat(string, either(containsString("a")).or(containsString("b")));
public static <T extends Throwable> Matcher<T> isThrowable(Matcher<T> throwableMatcher)
public static <T extends Exception> Matcher<T> isException(Matcher<T> exceptionMatcher)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |