public interface MockOperation<RequestType extends GenericMockRequest, ResponseType extends GenericMockResponse> extends Assertable, ModelItem, Releasable
A MockOperation for mocking HTTP-based Interfaces Operation and returning a MockResponse
| Type Params | Return Type | Name and description |
|---|---|---|
|
public ConditionalMatchingResponseSelector.ResponseType |
addNewMockResponse(java.lang.String name) |
|
public void |
addResponseFromResult(MockResult mockResult) |
|
public java.lang.String |
getDefaultResponse() |
|
public java.lang.String |
getDispatchStyle() |
|
public java.lang.String |
getDispatchXPath()This is a container used by dispatcher to xpath |
|
public MockOperationDispatcher<RequestType, ResponseType> |
getDispatcher() |
|
public MockResult<RequestType, ResponseType> |
getLastMockResult() |
|
public ConditionalMatchingResponseSelector.ResponseType |
getMockResponseAt(int index) |
|
public ConditionalMatchingResponseSelector.ResponseType |
getMockResponseByName(java.lang.String name) |
|
public int |
getMockResponseCount() |
|
public java.util.List<ResponseType> |
getMockResponses() |
|
public GenericMockService |
getMockService() |
|
public Operation |
getOperation() |
|
public ParameterRuleEngine |
getParameterRuleEngine(ParameterDispatcherContext dispatcherContext) |
|
public java.lang.String |
getRouteScript() |
|
public java.lang.String |
getScript()This is a container used by dispatcher to save script |
|
public java.lang.String |
getScriptHelpUrl() |
|
public boolean |
isConditionalRoutingEnabled() |
|
public boolean |
isRouteEnabled() |
|
public boolean |
isSaveRoutedResponse() |
|
public void |
removeMockResponse(ConditionalMatchingResponseSelector.ResponseType mockResponse) |
|
public void |
setConditionalRoutingEnabled(boolean conditionalRoutingEnabled) |
|
public void |
setDefaultResponse(java.lang.String response) |
|
public MockOperationDispatcher |
setDispatchStyle(java.lang.String style) |
|
public void |
setDispatchXPath(java.lang.String xPath)
|
|
public void |
setMockResultRoutedOperation(MockResult nonResponseAssociatedMockResult)Call this for a MockResult, created for this operation, that doesn't belong to any specific MockResponse. |
|
public void |
setRouteEnabled(boolean isRouteEnabled) |
|
public void |
setRouteScript(java.lang.String routeScript) |
|
public void |
setSaveRoutedResponse(boolean saveRoutedResponse) |
|
public void |
setScript(java.lang.String script)
|
|
public boolean |
shouldRoute(GenericMockRequest request) |
| Methods inherited from class | Name |
|---|---|
interface Assertable |
addAssertion, addAssertionsListener, cloneAssertion, getAssertableContent, getAssertableContentAsXml, getAssertableMetadata, getAssertableType, getAssertionAt, getAssertionByName, getAssertionCount, getAssertionList, getAssertionStatus, getAssertions, getDefaultAssertableContent, getInterface, getModelItem, getTestStep, insertAssertion, moveAssertion, removeAssertion, removeAssertionsListener |
interface Releasable |
release |
This is a container used by dispatcher to xpath
This is a container used by dispatcher to save script
xPath - this is a String that might be needed by the dispatch style used in this mock operation.Call this for a MockResult, created for this operation, that doesn't belong to any specific MockResponse. This can happen for Routing.
script - this is a String that might be needed by the dispatch style used in this mock operation.