use of io.cucumber.core.plugin.PluginFactory in project cucumber-jvm by cucumber.
the class CommandlineOptionsParserTest method set_monochrome_on_color_aware_formatters.
@Test
void set_monochrome_on_color_aware_formatters() {
RuntimeOptions options = parser.parse("--monochrome", "--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.isMonochrome(), is(true));
}
use of io.cucumber.core.plugin.PluginFactory in project cucumber-jvm by cucumber.
the class CommandlineOptionsParserTest method creates_html_formatter.
@Test
void creates_html_formatter() {
RuntimeOptions options = parser.parse("--plugin", "html:target/deeply/nested.html", "--glue", "somewhere").build();
Plugins plugins = new Plugins(new PluginFactory(), options);
plugins.setEventBusOnEventListenerPlugins(new TimeServiceEventBus(Clock.systemUTC(), UUID::randomUUID));
assertThat(plugins.getPlugins().get(0).getClass().getName(), is("io.cucumber.core.plugin.HtmlFormatter"));
}
use of io.cucumber.core.plugin.PluginFactory in project cucumber-jvm by cucumber.
the class CucumberOptionsAnnotationParserTest method inherit_plugin_from_baseclass.
@Test
void inherit_plugin_from_baseclass() {
RuntimeOptions runtimeOptions = parser().parse(SubClassWithFormatter.class).build();
Plugins plugins = new Plugins(new PluginFactory(), runtimeOptions);
plugins.setEventBusOnEventListenerPlugins(new TimeServiceEventBus(Clock.systemUTC(), UUID::randomUUID));
List<Plugin> pluginList = plugins.getPlugins();
assertAll(() -> assertPluginExists(pluginList, HtmlFormatter.class.getName()), () -> assertPluginExists(pluginList, PrettyFormatter.class.getName()));
}
Aggregations