@Test public void appendKeyValues_should_append_escaped_keyValues() { StringBuilder html = new StringBuilder(); KeyValue[] keyValues = new KeyValue[] { new KeyValue().withKey("key1 with <html>").withValue("value1"), new KeyValue().withKey("key2").withValue("value2 with <html>") }; cut.appendKeyValues(html, keyValues); assertThat(html.toString()).isEqualTo("<table>\n" + "<tr><th>key1 with &lt;html&gt;:</th><td><pre>value1</pre></td></tr>\n" + "<tr><th>key2:</th><td><pre>value2 with &lt;html&gt;</pre></td></tr>\n" + "</table>\n"); }
void appendKeyValues(StringBuilder html, KeyValue[] keyValues) { if (keyValues != null && keyValues.length != 0) { html.append("<table>\n"); for (KeyValue header : keyValues) { html.append("<tr><th>").append(escapeHtml(header.getKey())) .append(":</th><td><pre>").append(escapeHtml(header.getValue())) .append("</pre></td></tr>\n"); } html.append("</table>\n"); } }
PostmanService { void appendKeyValues(StringBuilder html, KeyValue[] keyValues) { if (keyValues != null && keyValues.length != 0) { html.append("<table>\n"); for (KeyValue header : keyValues) { html.append("<tr><th>").append(escapeHtml(header.getKey())) .append(":</th><td><pre>").append(escapeHtml(header.getValue())) .append("</pre></td></tr>\n"); } html.append("</table>\n"); } } }
PostmanService { void appendKeyValues(StringBuilder html, KeyValue[] keyValues) { if (keyValues != null && keyValues.length != 0) { html.append("<table>\n"); for (KeyValue header : keyValues) { html.append("<tr><th>").append(escapeHtml(header.getKey())) .append(":</th><td><pre>").append(escapeHtml(header.getValue())) .append("</pre></td></tr>\n"); } html.append("</table>\n"); } }  }
PostmanService { void appendKeyValues(StringBuilder html, KeyValue[] keyValues) { if (keyValues != null && keyValues.length != 0) { html.append("<table>\n"); for (KeyValue header : keyValues) { html.append("<tr><th>").append(escapeHtml(header.getKey())) .append(":</th><td><pre>").append(escapeHtml(header.getValue())) .append("</pre></td></tr>\n"); } html.append("</table>\n"); } }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); }
PostmanService { void appendKeyValues(StringBuilder html, KeyValue[] keyValues) { if (keyValues != null && keyValues.length != 0) { html.append("<table>\n"); for (KeyValue header : keyValues) { html.append("<tr><th>").append(escapeHtml(header.getKey())) .append(":</th><td><pre>").append(escapeHtml(header.getValue())) .append("</pre></td></tr>\n"); } html.append("</table>\n"); } }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); static final String FOLDER_DELIMITER; }