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 InvocationExpectationprivate booleanprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInSequenceOrderingConstraint(Sequence sequence) voidaddOrderingConstraint(OrderingConstraint constraint) voidaddParameterMatcher(org.hamcrest.Matcher<?> matcher) voidaddSideEffect(SideEffect sideEffect) private <T> TasMockedType(T mockObject, Object capturingImposter) private <T> TcaptureExpectedObject(T mockObject) private voidcheckParameterMatcherCount(Invocation invocation) voidvoidcreateExpectationFrom(Invocation invocation) of(org.hamcrest.Matcher<?> objectMatcher) <T> Tof(T mockObject) voidvoidsetCardinality(Cardinality cardinality) toExpectation(Action defaultAction) voidwith(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:
createExpectationFromin interfaceExpectationCapture
-
checkParameterMatcherCount
-
checkWasFullySpecified
public void checkWasFullySpecified() -
of
public <T> T of(T mockObject) - Specified by:
ofin interfaceReceiverClause
-
of
- Specified by:
ofin interfaceReceiverClause
-
method
- Specified by:
methodin interfaceMethodClause
-
method
- Specified by:
methodin interfaceMethodClause
-
with
public void with(org.hamcrest.Matcher<?>... parameterMatchers) - Specified by:
within interfaceParametersClause
-
withNoArguments
public void withNoArguments()- Specified by:
withNoArgumentsin interfaceParametersClause
-