use of io.cucumber.core.plugin.Plugins in project cucumber-jvm by cucumber.
the class CommandlineOptionsParserTest method handles_null_summary_printer_backward_compatible.
@Test
void handles_null_summary_printer_backward_compatible() {
RuntimeOptions options = parser.parse("--plugin", "null_summary", "--glue", "somewhere").build();
Plugins plugins = new Plugins(new PluginFactory(), options);
plugins.setEventBusOnEventListenerPlugins(new TimeServiceEventBus(Clock.systemUTC(), UUID::randomUUID));
assertAll(() -> assertThat(logRecordListener.getLogRecords().get(0).getMessage(), is("Use '--no-summary' instead of '-p/--plugin null_summary'. '-p/--plugin null_summary' will be removed in a future release.")), () -> assertThat(plugins.getPlugins(), not(hasItem(plugin("io.cucumber.core.plugin.DefaultSummaryPrinter")))));
}
use of io.cucumber.core.plugin.Plugins 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.plugin.Plugins 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.plugin.Plugins 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.plugin.Plugins 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")))));
}
Aggregations