use of io.cucumber.plugin.ColorAware in project cucumber-jvm by cucumber.
the class Plugins method setMonochromeOnColorAwarePlugins.
private void setMonochromeOnColorAwarePlugins(Plugin plugin) {
if (plugin instanceof ColorAware) {
ColorAware colorAware = (ColorAware) plugin;
colorAware.setMonochrome(pluginOptions.isMonochrome());
}
}
use of io.cucumber.plugin.ColorAware in project cucumber-jvm by cucumber.
the class PluginsTest method shouldSetMonochromeOnPlugin.
@Test
void shouldSetMonochromeOnPlugin() {
RuntimeOptions runtimeOptions = RuntimeOptions.defaultOptions();
Plugins plugins = new Plugins(pluginFactory, runtimeOptions);
ColorAware plugin = mock(ColorAware.class);
plugins.addPlugin(plugin);
verify(plugin).setMonochrome(false);
}
Aggregations