use of io.cucumber.plugin.event.SnippetsSuggestedEvent in project cucumber-jvm by cucumber.
the class DefaultSummaryPrinterTest method does_not_print_duplicate_snippets.
@Test
void does_not_print_duplicate_snippets() {
bus.send(new SnippetsSuggestedEvent(bus.getInstant(), URI.create("classpath:com/example.feature"), new Location(12, -1), new Location(13, -1), new Suggestion("", singletonList("snippet"))));
bus.send(new SnippetsSuggestedEvent(bus.getInstant(), URI.create("classpath:com/example.feature"), new Location(12, -1), new Location(14, -1), new Suggestion("", singletonList("snippet"))));
bus.send(new TestRunFinished(bus.getInstant(), new Result(Status.PASSED, Duration.ZERO, null)));
assertThat(new String(out.toByteArray(), UTF_8), equalToCompressingWhiteSpace("" + "\n" + "0 Scenarios\n" + "0 Steps\n" + "0m0.000s\n" + "\n" + "\n" + "You can implement missing steps with the snippets below:\n" + "\n" + "snippet\n" + "\n" + "\n"));
}
Aggregations