Class GetExpected
java.lang.Object
net.bugreaper.modules.mocks.enchanted.EnchantedSetup
net.bugreaper.modules.mocks.enchanted.GetExpected
-
Field Summary
Fields inherited from class net.bugreaper.modules.mocks.enchanted.EnchantedSetup
BASE_FIELDS, BODY_ABSENT_KEY, BODY_KEY, BODY_WRONG_KEY, FROM_TO_FIELDS, HEADERS_KEY, JSON_KEY, logger_mer, NO_VALUE_MESSAGE, PASS, QUERY_PARAM_KEY, RAW_BODY_KEY, REPLACE_ABSENT_MESSAGE, REQUEST_KEY, SCHEMA_KEY, SKIP, SKIPPED_MESSAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringassertRequestsCountText(org.json.JSONObject verifyJSON) static StringgetExpectedBody(org.json.JSONObject expectedMockSetup, String bodyType, String bodyNotSensitiveType) getExpectedBodyType(org.json.JSONObject expectedMockSetup) static StringgetExpectedHeaders(org.json.JSONObject expectedMockSetup) static StringgetExpectedMethodAndPath(org.json.JSONObject expectedMockSetup) static StringgetExpectedQueryParams(org.json.JSONObject expectedMockSetup) static booleangetExpectedStrict(org.json.JSONObject expectedMockSetup, String bodyType, String bodyNotSensitiveType) grabExpectedCount(org.json.JSONObject expectedMockJson)
-
Constructor Details
-
GetExpected
public GetExpected()
-
-
Method Details
-
grabExpectedCount
-
getExpectedBodyType
- Parameters:
expectedMockSetup- mockVerify JSON- Returns:
- Map(String, String) example {"json": "json"}, {"rawBody": "body"}, {"jsonSchema": "JSONSchema"} (key can be: rawBody/json/absent/jsonSchema) (value body or same as key or in other case - used for grab from JSON in next steps)
-
getExpectedBody
public static String getExpectedBody(org.json.JSONObject expectedMockSetup, String bodyType, String bodyNotSensitiveType) - Parameters:
expectedMockSetup- JSONObject with mockVerifybodyType- type of body for logic fromgetExpectedBodyType(JSONObject)bodyNotSensitiveType- type of body for grab fromgetExpectedBodyType(JSONObject)- Returns:
- String with Expected body
-
getExpectedHeaders
-
getExpectedQueryParams
-
getExpectedStrict
-
getExpectedMethodAndPath
-
assertRequestsCountText
-