@Test public void shouldFlushAndCloseProvidedStreamInClose() { PrintStream out = mock(PrintStream.class); Formatter formatter = new JSONFormatter(out); formatter.close(); verify(out).flush(); verify(out).close(); }
@Override public void close() { out.close(); }
JSONFormatter implements Reporter, Formatter { @Override public void close() { out.close(); } }
JSONFormatter implements Reporter, Formatter { @Override public void close() { out.close(); } JSONFormatter(Appendable out); }
JSONFormatter implements Reporter, Formatter { @Override public void close() { out.close(); } JSONFormatter(Appendable out); @Override void uri(String uri); @Override void feature(Feature feature); @Override void background(Background background); @Override void scenario(Scenario scenario); @Override void scenarioOutline(ScenarioOutline scenarioOutline); @Override void examples(Examples examples); @Override void step(Step step); @Override void match(Match match); @Override void embedding(String mimeType, byte[] data); @Override void write(String text); @Override void result(Result result); @Override void before(Match match, Result result); @Override void after(Match match, Result result); void appendDuration(final int timestamp); @Override void eof(); @Override void done(); @Override void close(); @Override void syntaxError(String state, String event, List<String> legalEvents, String uri, Integer line); @Override void startOfScenarioLifeCycle(Scenario scenario); @Override void endOfScenarioLifeCycle(Scenario scenario); }
JSONFormatter implements Reporter, Formatter { @Override public void close() { out.close(); } JSONFormatter(Appendable out); @Override void uri(String uri); @Override void feature(Feature feature); @Override void background(Background background); @Override void scenario(Scenario scenario); @Override void scenarioOutline(ScenarioOutline scenarioOutline); @Override void examples(Examples examples); @Override void step(Step step); @Override void match(Match match); @Override void embedding(String mimeType, byte[] data); @Override void write(String text); @Override void result(Result result); @Override void before(Match match, Result result); @Override void after(Match match, Result result); void appendDuration(final int timestamp); @Override void eof(); @Override void done(); @Override void close(); @Override void syntaxError(String state, String event, List<String> legalEvents, String uri, Integer line); @Override void startOfScenarioLifeCycle(Scenario scenario); @Override void endOfScenarioLifeCycle(Scenario scenario);  }