Package com.xebialabs.restito.semantics
Class Stub
java.lang.Object
com.xebialabs.restito.semantics.Stub
-
Constructor Summary
ConstructorsConstructorDescriptionStub
(Condition when, ActionSequence actionSequence) Creates a stub with action and conditionStub
(Condition when, Applicable action) Creates a stub with action and condition -
Method Summary
Modifier and TypeMethodDescriptionAppends an extra condition to the stub.org.glassfish.grizzly.http.server.Response
apply
(org.glassfish.grizzly.http.server.Response response) Executes all actions against the response.int
int
Get how many times stub expected to be calledboolean
isApplicable
(Call call) Checks whether the call satisfies condition of this stubvoid
setExpectedTimes
(int expectedTimes) void
setExpectSequenceCompleted
(Boolean expectSequenceCompleted) toString()
withAction
(Applicable action) withActionSequence
(List<Applicable> actionSequence) withExceededAction
(Applicable exceededAction) withExtraAction
(Applicable extraAction) Appends an extra action to the stubwithSequenceItem
(Applicable nextWhat)
-
Constructor Details
-
Stub
Creates a stub with action and condition -
Stub
-
Stub
Creates a stub with action and condition
-
-
Method Details
-
alsoWhen
Appends an extra condition to the stub. -
withExtraAction
Appends an extra action to the stub -
withSequenceItem
-
isApplicable
Checks whether the call satisfies condition of this stub -
apply
public org.glassfish.grizzly.http.server.Response apply(org.glassfish.grizzly.http.server.Response response) Executes all actions against the response. -
withAction
-
withActionSequence
-
withExceededAction
-
getAppliedTimes
public int getAppliedTimes() -
setExpectedTimes
public void setExpectedTimes(int expectedTimes) -
setExpectSequenceCompleted
-
getActionSequence
-
getExpectSequenceCompleted
-
getExpectedTimes
public int getExpectedTimes()Get how many times stub expected to be called -
toString
-
withLabel
-