org.jmock
public class Expectations extends Object implements org.jmock.internal.ExpectationBuilder, CardinalityClause, ArgumentConstraintPhrases, ActionClause
Constructor and Description |
---|
Expectations() |
Modifier and Type | Method and Description |
---|---|
static |
a(Class<?> type)
Deprecated.
use
aNonNull(java.lang.Class or any(java.lang.Class until type inference actually works in a future version of Java |
MethodClause |
allowing( |
static |
an(Class<?> type)
Deprecated.
use
aNonNull(java.lang.Class or any(java.lang.Class until type inference actually works in a future version of Java |
static <T> |
aNonNull(Class<T> type) |
static <T> |
aNull(Class<T> type) |
static <T> |
any(Class<T> type) |
static <T> |
anything() |
ReceiverClause |
atLeast(int count) |
ReceiverClause |
atMost(int count) |
ReceiverClause |
between(int minCount,
int maxCount) |
void |
buildExpectations(Action defaultAction,
org.jmock.internal.ExpectationCollector collector) |
protected org.jmock.internal.InvocationExpectationBuilder |
currentBuilder() |
static Action |
doAll(Action... actions) |
static <T> |
equal(T value) |
ReceiverClause |
exactly(int count) |
MethodClause |
ignoring( |
<T> T |
ignoring(T mockObject) |
void |
inSequence(Sequence sequence) |
void |
inSequences(Sequence... sequences) |
<T> T |
never(T mockObject) |
static Action |
onConsecutiveCalls(Action... actions) |
<T> T |
one(T mockObject)
This will eventually be deprecated.
|
<T> T |
oneOf(T mockObject) |
static Action |
returnEnumeration(Collection<?> collection) |
static <T> Action |
returnEnumeration(T... items) |
static Action |
returnIterator(Collection<?> collection) |
static <T> Action |
returnIterator(T... items) |
static Action |
returnValue(Object result) |
static <T> |
same(T value) |
void |
then(org.jmock.internal.State state) |
static Action |
throwException(Throwable throwable) |
void |
when(org.jmock.internal.StatePredicate predicate) |
void |
will(Action action) |
boolean |
with( |
byte |
with( |
short |
with( |
char |
with( |
int |
with( |
long |
with( |
float |
with( |
double |
with( |
<T> T |
with( |
public void buildExpectations(Action defaultAction, org.jmock.internal.ExpectationCollector collector)
buildExpectations
in interface org.jmock.internal.ExpectationBuilder
protected org.jmock.internal.InvocationExpectationBuilder currentBuilder()
public ReceiverClause exactly(int count)
exactly
in interface CardinalityClause
public <T> T oneOf(T mockObject)
public <T> T one(T mockObject)
oneOf
instead.one
in interface CardinalityClause
public ReceiverClause atLeast(int count)
atLeast
in interface CardinalityClause
public ReceiverClause between(int minCount, int maxCount)
between
in interface CardinalityClause
public ReceiverClause atMost(int count)
atMost
in interface CardinalityClause
public MethodClause allowing(mockObjectMatcher)
allowing
in interface CardinalityClause
public <T> T ignoring(T mockObject)
ignoring
in interface CardinalityClause
public MethodClause ignoring(mockObjectMatcher)
ignoring
in interface CardinalityClause
public <T> T never(T mockObject)
never
in interface CardinalityClause
public <T> T with(matcher)
with
in interface ArgumentConstraintPhrases
public boolean with(matcher)
with
in interface ArgumentConstraintPhrases
public byte with(matcher)
with
in interface ArgumentConstraintPhrases
public short with(matcher)
with
in interface ArgumentConstraintPhrases
public char with(matcher)
with
in interface ArgumentConstraintPhrases
public int with(matcher)
with
in interface ArgumentConstraintPhrases
public long with(matcher)
with
in interface ArgumentConstraintPhrases
public float with(matcher)
with
in interface ArgumentConstraintPhrases
public double with(matcher)
with
in interface ArgumentConstraintPhrases
public void will(Action action)
will
in interface ActionClause
public static <T>equal(T value)
public static <T>same(T value)
public static <T>any(Class<T> type)
public static <T>anything()
@Deprecated public statica(Class<?> type)
aNonNull(java.lang.Class)
or any(java.lang.Class)
until type inference actually works in a future version of Java@Deprecated public statican(Class<?> type)
aNonNull(java.lang.Class)
or any(java.lang.Class)
until type inference actually works in a future version of Javapublic static <T>aNull(Class<T> type)
public static <T>aNonNull(Class<T> type)
public static Action returnIterator(Collection<?> collection)
public static <T> Action returnIterator(T... items)
public static Action returnEnumeration(Collection<?> collection)
public static <T> Action returnEnumeration(T... items)
public void when(org.jmock.internal.StatePredicate predicate)
public void then(org.jmock.internal.State state)
public void inSequence(Sequence sequence)
public void inSequences(Sequence... sequences)