|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.mockachino.matchers.MatchersBase
public class MatchersBase
This class contain a lot of built in matchers.
Constructor Summary | |
---|---|
MatchersBase()
|
Method Summary | ||
---|---|---|
static
|
mAnd(Matcher<T>... matchers)
Return a new matcher that matches if all the given matchers match |
|
static
|
mAny(java.lang.Class<T> clazz)
Return a new matcher that always matches. |
|
static Matcher<java.lang.Boolean> |
mAnyBoolean()
Return a new matcher that always matches. |
|
static Matcher<java.lang.Byte> |
mAnyByte()
Return a new matcher that always matches. |
|
static Matcher<java.lang.Character> |
mAnyChar()
Return a new matcher that always matches. |
|
static Matcher<java.lang.Double> |
mAnyDouble()
Return a new matcher that always matches. |
|
static Matcher<java.lang.Float> |
mAnyFloat()
Return a new matcher that always matches. |
|
static Matcher<java.lang.Integer> |
mAnyInt()
Return a new matcher that always matches. |
|
static Matcher<java.lang.Long> |
mAnyLong()
Return a new matcher that always matches. |
|
static Matcher<java.lang.Short> |
mAnyShort()
Return a new matcher that always matches. |
|
static
|
matchEq(T value,
java.lang.Class<T> clazz)
|
|
static Matcher<java.lang.String> |
mContains(java.lang.String s)
Return a new matcher that matches if the argument contains s. |
|
static Matcher<java.lang.String> |
mEndsWith(java.lang.String s)
Return a new matcher that matches if the argument ends with s. |
|
static
|
mEq(T value)
Returns a new matcher that compares the value with the actual parameter based on equality. |
|
static
|
mNot(Matcher<T> matcher)
Return a new matcher that's the negation of the specified matcher. |
|
static
|
mOr(Matcher<T>... matchers)
Return a new matcher that matches if any of the given matchers match |
|
static Matcher<java.lang.String> |
mRegexp(java.lang.String s)
Return a new matcher that matches against a regular expression |
|
static
|
mSame(T value)
Returns a new matcher that compares the identity of the value with the actual parameter |
|
static Matcher<java.lang.String> |
mStartsWith(java.lang.String s)
Return a new matcher that matches if the argument starts with s. |
|
static
|
mType(java.lang.Class<T> clazz,
java.lang.Class<?>... classes)
Return a new matcher that matches if the argument is an instance of any of the classes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MatchersBase()
Method Detail |
---|
public static <T> Matcher<T> mNot(Matcher<T> matcher)
matcher
-
public static <T> Matcher<T> mAnd(Matcher<T>... matchers)
matchers
-
public static <T> Matcher<T> mOr(Matcher<T>... matchers)
matchers
-
public static <T> Matcher<T> mType(java.lang.Class<T> clazz, java.lang.Class<?>... classes)
public static <T> Matcher<T> mEq(T value)
value
-
public static <T> Matcher<T> matchEq(T value, java.lang.Class<T> clazz)
public static <T> Matcher<T> mSame(T value)
value
-
public static <T> Matcher<T> mAny(java.lang.Class<T> clazz)
clazz
- - the return type
public static Matcher<java.lang.Integer> mAnyInt()
public static Matcher<java.lang.Long> mAnyLong()
public static Matcher<java.lang.Double> mAnyDouble()
public static Matcher<java.lang.Float> mAnyFloat()
public static Matcher<java.lang.Short> mAnyShort()
public static Matcher<java.lang.Byte> mAnyByte()
public static Matcher<java.lang.Boolean> mAnyBoolean()
public static Matcher<java.lang.Character> mAnyChar()
public static Matcher<java.lang.String> mRegexp(java.lang.String s)
s
-
public static Matcher<java.lang.String> mContains(java.lang.String s)
s
-
public static Matcher<java.lang.String> mStartsWith(java.lang.String s)
s
-
public static Matcher<java.lang.String> mEndsWith(java.lang.String s)
s
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |