public class InvocationExpectationBuilder extends Object implements ExpectationCapture, ReceiverClause, MethodClause, ParametersClause
Constructor and Description |
---|
InvocationExpectationBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addInSequenceOrderingConstraint(Sequence sequence) |
void |
addOrderingConstraint(OrderingConstraint constraint) |
void |
addParameterMatcher(org.hamcrest.Matcher<?> matcher) |
void |
addSideEffect(SideEffect sideEffect) |
void |
checkWasFullySpecified() |
void |
createExpectationFrom(Invocation invocation) |
ParametersClause |
method(org.hamcrest.Matcher<Method> methodMatcher) |
ParametersClause |
method(String nameRegex) |
MethodClause |
of(org.hamcrest.Matcher<?> objectMatcher) |
<T> T |
of(T mockObject) |
void |
setAction(Action action) |
void |
setCardinality(Cardinality cardinality) |
Expectation |
toExpectation(Action defaultAction) |
void |
with(org.hamcrest.Matcher<?>... parameterMatchers) |
void |
withNoArguments() |
public Expectation toExpectation(Action defaultAction)
public void setCardinality(Cardinality cardinality)
public void addParameterMatcher(org.hamcrest.Matcher<?> matcher)
public void addOrderingConstraint(OrderingConstraint constraint)
public void addInSequenceOrderingConstraint(Sequence sequence)
public void setAction(Action action)
public void addSideEffect(SideEffect sideEffect)
public void createExpectationFrom(Invocation invocation)
createExpectationFrom
in interface ExpectationCapture
public void checkWasFullySpecified()
public <T> T of(T mockObject)
of
in interface ReceiverClause
public MethodClause of(org.hamcrest.Matcher<?> objectMatcher)
of
in interface ReceiverClause
public ParametersClause method(org.hamcrest.Matcher<Method> methodMatcher)
method
in interface MethodClause
public ParametersClause method(String nameRegex)
method
in interface MethodClause
public void with(org.hamcrest.Matcher<?>... parameterMatchers)
with
in interface ParametersClause
public void withNoArguments()
withNoArguments
in interface ParametersClause
Copyright © 2003–2021 jMock. All rights reserved.