Package io.inversion.action.misc
Class MockAction
- All Implemented Interfaces:
Comparable<MockAction>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.inversion.Rule
Rule.RuleMatcher -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected JSNodeprotected Stringprotected Stringprotected intFields inherited from class io.inversion.Rule
configMap, configStr, excludeMatchers, excludeOn, includeMatchers, includeOn, log, name, order -
Constructor Summary
ConstructorsConstructorDescriptionMockAction(JSNode json) MockAction(String name) MockAction(String status, JSNode json) MockAction(String methods, String includePaths, String name) MockAction(String methods, String includePaths, String name, JSNode json) -
Method Summary
Modifier and TypeMethodDescriptiongetJson()intbooleanvoidOverride this method with your custom business logic or override one of the http method "doMETHOD" specific handlers.wihtStatusCode(int statusCode) withCancelRequest(boolean cancelRequest) withJsonUrl(String jsonUrl) withStatus(String status) Methods inherited from class io.inversion.Rule
checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludePaths, getConfig, getConfig, getConfigKeys, getDefaultIncludeMatch, getExcludeMatchers, getIncludeMatchers, getName, getOrder, match, matches, matches, toString, withConfig, withExcludeOn, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withIncludeOn, withName, withOrder
-
Field Details
-
json
-
jsonUrl
-
statusCode
protected int statusCode -
status
-
cancelRequest
protected boolean cancelRequest
-
-
Constructor Details
-
MockAction
public MockAction() -
MockAction
-
MockAction
-
MockAction
-
MockAction
-
MockAction
-
-
Method Details
-
run
Description copied from class:ActionOverride this method with your custom business logic or override one of the http method "doMETHOD" specific handlers.- Overrides:
runin classAction<MockAction>- Parameters:
req- the Request being servicedres- the Reponse being generated- Throws:
ApiException
-
withJson
-
getJsonUrl
-
withJsonUrl
-
getJson
-
getStatusCode
public int getStatusCode() -
wihtStatusCode
-
getStatus
-
withStatus
-
isCancelRequest
public boolean isCancelRequest() -
withCancelRequest
-