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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<org.hamcrest.Matcher<?>> private final InvocationExpectation
private boolean
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInSequenceOrderingConstraint
(Sequence sequence) void
addOrderingConstraint
(OrderingConstraint constraint) void
addParameterMatcher
(org.hamcrest.Matcher<?> matcher) void
addSideEffect
(SideEffect sideEffect) private <T> T
asMockedType
(T mockObject, Object capturingImposter) private <T> T
captureExpectedObject
(T mockObject) private void
checkParameterMatcherCount
(Invocation invocation) void
void
createExpectationFrom
(Invocation invocation) of
(org.hamcrest.Matcher<?> objectMatcher) <T> T
of
(T mockObject) void
void
setCardinality
(Cardinality cardinality) toExpectation
(Action defaultAction) void
with
(org.hamcrest.Matcher<?>... parameterMatchers) void
-
Field Details
-
expectation
-
isFullySpecified
private boolean isFullySpecified -
needsDefaultAction
private boolean needsDefaultAction -
capturedParameterMatchers
-
-
Constructor Details
-
InvocationExpectationBuilder
public InvocationExpectationBuilder()
-
-
Method Details
-
toExpectation
-
setCardinality
-
addParameterMatcher
public void addParameterMatcher(org.hamcrest.Matcher<?> matcher) -
addOrderingConstraint
-
addInSequenceOrderingConstraint
-
setAction
-
addSideEffect
-
captureExpectedObject
private <T> T captureExpectedObject(T mockObject) -
asMockedType
-
createExpectationFrom
- Specified by:
createExpectationFrom
in interfaceExpectationCapture
-
checkParameterMatcherCount
-
checkWasFullySpecified
public void checkWasFullySpecified() -
of
public <T> T of(T mockObject) - Specified by:
of
in interfaceReceiverClause
-
of
- Specified by:
of
in interfaceReceiverClause
-
method
- Specified by:
method
in interfaceMethodClause
-
method
- 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
-