Class BaseExpectations
- java.lang.Object
-
- org.jmock.Expectations
-
- org.opendaylight.lispflowmapping.tools.junit.BaseExpectations
-
- All Implemented Interfaces:
org.jmock.internal.ExpectationBuilder,org.jmock.syntax.ActionClause,org.jmock.syntax.ArgumentConstraintPhrases,org.jmock.syntax.CardinalityClause
- Direct Known Subclasses:
BaseTestCase
public abstract class BaseExpectations extends org.jmock.Expectations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBaseExpectations.ReturnFieldclassBaseExpectations.StringArrayMatcherstatic classBaseExpectations.ValueSaverAction<T>
-
Field Summary
Fields Modifier and Type Field Description protected org.jmock.Mockerycontextprotected static org.slf4j.LoggerLOGprotected booleanshowAllExpectations
-
Constructor Summary
Constructors Constructor Description BaseExpectations()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafter()org.jmock.syntax.ReceiverClauseatLeast(int count)org.jmock.syntax.ReceiverClauseatMost(int count)voidbefore()org.jmock.syntax.ReceiverClausebetween(int minCount, int maxCount)protected static <T> org.hamcrest.Matcher<T[]>contains(T... expected)protected static <T> org.hamcrest.Matcher<T[]>doseNotContain(T... forbiddenValues)org.jmock.syntax.ReceiverClauseexactly(int count)protected org.jmock.internal.InvocationExpectationBuildergetCurrentBuilder()protected voidret(java.lang.Object result)protected voidretField(java.lang.Object container, java.lang.String fieldName)protected voidrethrow(java.lang.Throwable throwable)protected voidretMethod(java.lang.String methodName)protected voidrets(java.lang.Object... results)static org.jmock.api.ActionreturnValues(java.lang.Object... result)protected static <T> org.hamcrest.Matcher<T[]>sameArbitraryArray(T... expectedArr)protected <T> Twany(java.lang.Class<T> type)protected booleanwanybool()protected intwanyint()protected longwanylong()protected booleanweq(boolean instance)protected intweq(int instance)protected longweq(long instance)protected shortweq(short instance)protected <T> Tweq(T instance)protected <T> Twsame(T instance)java.lang.String[]wStrArr(java.lang.Object... expected)-
Methods inherited from class org.jmock.Expectations
a, allowing, allowing, an, aNonNull, aNull, any, anything, buildExpectations, currentBuilder, doAll, equal, ignoring, ignoring, inSequence, inSequences, never, onConsecutiveCalls, one, oneOf, returnEnumeration, returnEnumeration, returnIterator, returnIterator, returnValue, same, then, throwException, when, will, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with
-
-
-
-
Method Detail
-
before
public void before() throws java.lang.Exception- Throws:
java.lang.Exception
-
after
public void after() throws java.lang.Exception- Throws:
java.lang.Exception
-
ret
protected final void ret(java.lang.Object result)
-
rethrow
protected final void rethrow(java.lang.Throwable throwable)
-
retField
protected final void retField(java.lang.Object container, java.lang.String fieldName) throws java.lang.Exception- Throws:
java.lang.Exception
-
rets
protected final void rets(java.lang.Object... results)
-
wany
protected final <T> T wany(java.lang.Class<T> type)
-
wanyint
protected final int wanyint()
-
wanylong
protected final long wanylong()
-
wanybool
protected final boolean wanybool()
-
wsame
protected final <T> T wsame(T instance)
-
weq
protected final <T> T weq(T instance)
-
weq
protected final short weq(short instance)
-
weq
protected final int weq(int instance)
-
weq
protected final long weq(long instance)
-
weq
protected final boolean weq(boolean instance)
-
returnValues
public static org.jmock.api.Action returnValues(java.lang.Object... result)
-
retMethod
protected void retMethod(java.lang.String methodName)
-
contains
@SafeVarargs protected static final <T> org.hamcrest.Matcher<T[]> contains(T... expected)
-
sameArbitraryArray
@SafeVarargs protected static final <T> org.hamcrest.Matcher<T[]> sameArbitraryArray(T... expectedArr)
-
doseNotContain
@SafeVarargs protected static final <T> org.hamcrest.Matcher<T[]> doseNotContain(T... forbiddenValues)
-
wStrArr
public final java.lang.String[] wStrArr(java.lang.Object... expected)
- Parameters:
expected- null are considered "any"
-
getCurrentBuilder
protected org.jmock.internal.InvocationExpectationBuilder getCurrentBuilder()
-
exactly
public org.jmock.syntax.ReceiverClause exactly(int count)
- Specified by:
exactlyin interfaceorg.jmock.syntax.CardinalityClause- Overrides:
exactlyin classorg.jmock.Expectations
-
atLeast
public org.jmock.syntax.ReceiverClause atLeast(int count)
- Specified by:
atLeastin interfaceorg.jmock.syntax.CardinalityClause- Overrides:
atLeastin classorg.jmock.Expectations
-
between
public org.jmock.syntax.ReceiverClause between(int minCount, int maxCount)- Specified by:
betweenin interfaceorg.jmock.syntax.CardinalityClause- Overrides:
betweenin classorg.jmock.Expectations
-
atMost
public org.jmock.syntax.ReceiverClause atMost(int count)
- Specified by:
atMostin interfaceorg.jmock.syntax.CardinalityClause- Overrides:
atMostin classorg.jmock.Expectations
-
-