@Test void shouldEscapeEntities() { try (Stream<String> lines = Stream.of("<b>CheckStyle</b> <script>execute</script>")) { ConsoleDetail consoleDetail = new ConsoleDetail(mock(Run.class), lines, 1, 2); assertThat(consoleDetail.getSourceCode()) .doesNotContain("<b>CheckStyle</b> <script>execute</script>") .contains("&lt;b&gt;CheckStyle&lt;/b&gt; &lt;script&gt;execute&lt;"); } }
@SuppressWarnings("unused") public String getSourceCode() { return sourceCode; }
ConsoleDetail implements ModelObject { @SuppressWarnings("unused") public String getSourceCode() { return sourceCode; } }
ConsoleDetail implements ModelObject { @SuppressWarnings("unused") public String getSourceCode() { return sourceCode; } ConsoleDetail(final Run<?, ?> owner, final Stream<String> consoleLog, final int from, final int to); }
ConsoleDetail implements ModelObject { @SuppressWarnings("unused") public String getSourceCode() { return sourceCode; } ConsoleDetail(final Run<?, ?> owner, final Stream<String> consoleLog, final int from, final int to); @Override String getDisplayName(); @SuppressWarnings("unused") // Called by jelly view to show the side panel Run<?, ?> getOwner(); @SuppressWarnings("unused") // Called by jelly view String getSourceCode(); }
ConsoleDetail implements ModelObject { @SuppressWarnings("unused") public String getSourceCode() { return sourceCode; } ConsoleDetail(final Run<?, ?> owner, final Stream<String> consoleLog, final int from, final int to); @Override String getDisplayName(); @SuppressWarnings("unused") // Called by jelly view to show the side panel Run<?, ?> getOwner(); @SuppressWarnings("unused") // Called by jelly view String getSourceCode();  }