@Test public void testSimpleString() { underTest = new DataExtractionSupport(logUtils); String processedStr = underTest.process(getSimpleStringObject(), null, null); Assert.assertEquals(processedStr, getSimpleStringObject()); }
public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = processString((String) extractionObj, response); } else if (extractionObj.getClass().equals(HashMap.class)) { outputStr = processMap((Map) extractionObj, response); } else { throw new HeatException(logUtils.getExceptionDetails() + "actualValue/expectedValue belongs to " + extractionObj.getClass().toString() + " not supported"); } logUtils.trace("outputStr = '{}' (class: {})", outputStr, extractionObj.getClass().toString()); return outputStr; }
DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = processString((String) extractionObj, response); } else if (extractionObj.getClass().equals(HashMap.class)) { outputStr = processMap((Map) extractionObj, response); } else { throw new HeatException(logUtils.getExceptionDetails() + "actualValue/expectedValue belongs to " + extractionObj.getClass().toString() + " not supported"); } logUtils.trace("outputStr = '{}' (class: {})", outputStr, extractionObj.getClass().toString()); return outputStr; } }
DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = processString((String) extractionObj, response); } else if (extractionObj.getClass().equals(HashMap.class)) { outputStr = processMap((Map) extractionObj, response); } else { throw new HeatException(logUtils.getExceptionDetails() + "actualValue/expectedValue belongs to " + extractionObj.getClass().toString() + " not supported"); } logUtils.trace("outputStr = '{}' (class: {})", outputStr, extractionObj.getClass().toString()); return outputStr; } DataExtractionSupport(LoggingUtils logUtils); }
DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = processString((String) extractionObj, response); } else if (extractionObj.getClass().equals(HashMap.class)) { outputStr = processMap((Map) extractionObj, response); } else { throw new HeatException(logUtils.getExceptionDetails() + "actualValue/expectedValue belongs to " + extractionObj.getClass().toString() + " not supported"); } logUtils.trace("outputStr = '{}' (class: {})", outputStr, extractionObj.getClass().toString()); return outputStr; } DataExtractionSupport(LoggingUtils logUtils); String process(Object extractionObj, Response response, Map retrievedParametersFlowMode); }
DataExtractionSupport { public String process(Object extractionObj, Response response, Map retrievedParametersFlowMode) { String outputStr = ""; this.retrievedParametersFlowMode = retrievedParametersFlowMode; logUtils.trace("extractionObj = '{}'", extractionObj.toString()); if (extractionObj.getClass().equals(String.class)) { outputStr = processString((String) extractionObj, response); } else if (extractionObj.getClass().equals(HashMap.class)) { outputStr = processMap((Map) extractionObj, response); } else { throw new HeatException(logUtils.getExceptionDetails() + "actualValue/expectedValue belongs to " + extractionObj.getClass().toString() + " not supported"); } logUtils.trace("outputStr = '{}' (class: {})", outputStr, extractionObj.getClass().toString()); return outputStr; } DataExtractionSupport(LoggingUtils logUtils); String process(Object extractionObj, Response response, Map retrievedParametersFlowMode); static final String STRING_TO_PARSE_JSON_ELEMENT; static final String REGEXP_JSON_ELEMENT; static final String REGEXP_MATCH_JSON_ELEMENT; static final String OCCURRENCE_JSON_ELEMENT; }