|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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(
Deprecated. Please use CoreMatchers#both(Matcher) instead. |
|
static |
containsString(java.lang.String substring)
Deprecated. Please use CoreMatchers#containsString(String) instead. |
|
static
|
either(
Deprecated. Please use CoreMatchers#either(Matcher) instead. |
|
static
|
everyItem(
Deprecated. Please use CoreMatchers#everyItem(Matcher) instead. |
|
static
|
hasItem(
Deprecated. Please use CoreMatchers#hasItem(Matcher) instead. |
|
static
|
hasItem(T element)
Deprecated. Please use CoreMatchers#hasItem(Object) instead. |
|
static
|
hasItems(
Deprecated. Please use CoreMatchers#hasItems(Matcher...) instead. |
|
static
|
hasItems(T... elements)
Deprecated. Please use CoreMatchers#hasItems(Object...) instead. |
|
static
|
isException(
|
|
static
|
isThrowable(
|
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>hasItem(T element)
CoreMatchers#hasItem(Object)
instead.
@Deprecated public static <T>hasItem( elementMatcher)
CoreMatchers#hasItem(Matcher)
instead.
@Deprecated public static <T>hasItems(T... elements)
CoreMatchers#hasItems(Object...)
instead.
@Deprecated public static <T>hasItems( ... elementMatchers)
CoreMatchers#hasItems(Matcher...)
instead.
@Deprecated public static <T>everyItem( elementMatcher)
CoreMatchers#everyItem(Matcher)
instead.
@Deprecated public staticcontainsString(java.lang.String substring)
CoreMatchers#containsString(String)
instead.
@Deprecated public static <T>both( matcher)
CoreMatchers#both(Matcher)
instead.
assertThat(string, both(containsString("a")).and(containsString("b")));
@Deprecated public static <T>either( matcher)
CoreMatchers#either(Matcher)
instead.
assertThat(string, either(containsString("a")).or(containsString("b")));
public static <T extends java.lang.Throwable>isThrowable( throwableMatcher)
public static <T extends java.lang.Exception>isException( exceptionMatcher)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |