Package org.jmock.internal
Class InvocationExpectationBuilder
- java.lang.Object
-
- org.jmock.internal.InvocationExpectationBuilder
-
- All Implemented Interfaces:
ExpectationCapture
,MethodClause
,ParametersClause
,ReceiverClause
public class InvocationExpectationBuilder extends Object implements ExpectationCapture, ReceiverClause, MethodClause, ParametersClause
-
-
Constructor Summary
Constructors Constructor Description InvocationExpectationBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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(String nameRegex)
ParametersClause
method(org.hamcrest.Matcher<Method> methodMatcher)
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()
-
-
-
Method Detail
-
toExpectation
public Expectation toExpectation(Action defaultAction)
-
setCardinality
public void setCardinality(Cardinality cardinality)
-
addParameterMatcher
public void addParameterMatcher(org.hamcrest.Matcher<?> matcher)
-
addOrderingConstraint
public void addOrderingConstraint(OrderingConstraint constraint)
-
addInSequenceOrderingConstraint
public void addInSequenceOrderingConstraint(Sequence sequence)
-
setAction
public void setAction(Action action)
-
addSideEffect
public void addSideEffect(SideEffect sideEffect)
-
createExpectationFrom
public void createExpectationFrom(Invocation invocation)
- Specified by:
createExpectationFrom
in interfaceExpectationCapture
-
checkWasFullySpecified
public void checkWasFullySpecified()
-
of
public <T> T of(T mockObject)
- Specified by:
of
in interfaceReceiverClause
-
of
public MethodClause of(org.hamcrest.Matcher<?> objectMatcher)
- Specified by:
of
in interfaceReceiverClause
-
method
public ParametersClause method(org.hamcrest.Matcher<Method> methodMatcher)
- Specified by:
method
in interfaceMethodClause
-
method
public ParametersClause method(String nameRegex)
- Specified by:
method
in interfaceMethodClause
-
with
public void with(org.hamcrest.Matcher<?>... parameterMatchers)
- Specified by:
with
in interfaceParametersClause
-
withNoArguments
public void withNoArguments()
- Specified by:
withNoArguments
in interfaceParametersClause
-
-