@Test public void returnEmptyStringForPlainFormatting() throws Exception { ResultSummary result = mock(ResultSummary.class); String actual = new StatisticsCollector(Format.PLAIN).collect(result); assertThat(actual, is("")); }
public String collect(@Nonnull ResultSummary summary) { if (Format.VERBOSE == format) { return collectStatistics(summary); } else { return ""; } }
StatisticsCollector { public String collect(@Nonnull ResultSummary summary) { if (Format.VERBOSE == format) { return collectStatistics(summary); } else { return ""; } } }
StatisticsCollector { public String collect(@Nonnull ResultSummary summary) { if (Format.VERBOSE == format) { return collectStatistics(summary); } else { return ""; } } StatisticsCollector(@Nonnull Format format); }
StatisticsCollector { public String collect(@Nonnull ResultSummary summary) { if (Format.VERBOSE == format) { return collectStatistics(summary); } else { return ""; } } StatisticsCollector(@Nonnull Format format); String collect(@Nonnull ResultSummary summary); }
StatisticsCollector { public String collect(@Nonnull ResultSummary summary) { if (Format.VERBOSE == format) { return collectStatistics(summary); } else { return ""; } } StatisticsCollector(@Nonnull Format format); String collect(@Nonnull ResultSummary summary);  }