use of io.cucumber.core.runtime.TimeServiceEventBus in project cucumber-jvm by cucumber.
the class CommandlineOptionsParserTest method creates_no_formatter_by_default.
@Test
void creates_no_formatter_by_default() {
RuntimeOptions options = parser.parse().build();
Plugins plugins = new Plugins(new PluginFactory(), options);
plugins.setEventBusOnEventListenerPlugins(new TimeServiceEventBus(Clock.systemUTC(), UUID::randomUUID));
assertThat(plugins.getPlugins(), is(empty()));
}
use of io.cucumber.core.runtime.TimeServiceEventBus in project cucumber-jvm by cucumber.
the class CommandlineOptionsParserTest method creates_default_summary_printer_if_not_disabled.
@Test
void creates_default_summary_printer_if_not_disabled() {
RuntimeOptions options = parser.parse().addDefaultSummaryPrinterIfNotDisabled().build();
Plugins plugins = new Plugins(new PluginFactory(), options);
plugins.setEventBusOnEventListenerPlugins(new TimeServiceEventBus(Clock.systemUTC(), UUID::randomUUID));
assertThat(plugins.getPlugins(), hasItem(plugin("io.cucumber.core.plugin.DefaultSummaryPrinter")));
}
use of io.cucumber.core.runtime.TimeServiceEventBus in project cucumber-jvm by cucumber.
the class CommandlineOptionsParserTest method replaces_incompatible_intellij_idea_plugin.
@Test
void replaces_incompatible_intellij_idea_plugin() {
RuntimeOptions options = parser.parse("--plugin", "org.jetbrains.plugins.cucumber.java.run.CucumberJvm3SMFormatter").build();
Plugins plugins = new Plugins(new PluginFactory(), options);
plugins.setEventBusOnEventListenerPlugins(new TimeServiceEventBus(Clock.systemUTC(), UUID::randomUUID));
assertThat(plugins.getPlugins(), not(hasItem(plugin("io.cucumber.core.plugin.PrettyPrinter"))));
}
use of io.cucumber.core.runtime.TimeServiceEventBus in project cucumber-jvm by cucumber.
the class CommandlineOptionsParserTest method disables_default_summary_printer.
@Test
void disables_default_summary_printer() {
RuntimeOptions options = parser.parse("--no-summary", "--glue", "somewhere").addDefaultSummaryPrinterIfNotDisabled().build();
Plugins plugins = new Plugins(new PluginFactory(), options);
plugins.setEventBusOnEventListenerPlugins(new TimeServiceEventBus(Clock.systemUTC(), UUID::randomUUID));
assertAll(() -> assertThat(plugins.getPlugins(), not(hasItem(plugin("io.cucumber.core.plugin.DefaultSummaryPrinter")))));
}
use of io.cucumber.core.runtime.TimeServiceEventBus in project cucumber-jvm by cucumber.
the class CommandlineOptionsParserTest method set_strict_on_strict_aware_formatters.
@Test
void set_strict_on_strict_aware_formatters() {
RuntimeOptions options = parser.parse("--plugin", AwareFormatter.class.getName()).build();
Plugins plugins = new Plugins(new PluginFactory(), options);
plugins.setEventBusOnEventListenerPlugins(new TimeServiceEventBus(Clock.systemUTC(), UUID::randomUUID));
AwareFormatter formatter = (AwareFormatter) plugins.getPlugins().get(0);
assertThat(formatter.isStrict(), is(true));
}
Aggregations