Search in sources :

Example 1 with StrictAware

use of io.cucumber.plugin.StrictAware in project cucumber-jvm by cucumber.

the class Plugins method setStrictOnStrictAwarePlugins.

private void setStrictOnStrictAwarePlugins(Plugin plugin) {
    if (plugin instanceof StrictAware) {
        StrictAware strictAware = (StrictAware) plugin;
        strictAware.setStrict(true);
    }
}
Also used : StrictAware(io.cucumber.plugin.StrictAware)

Example 2 with StrictAware

use of io.cucumber.plugin.StrictAware in project cucumber-jvm by cucumber.

the class PluginsTest method shouldSetStrictOnPlugin.

@Test
void shouldSetStrictOnPlugin() {
    RuntimeOptions runtimeOptions = RuntimeOptions.defaultOptions();
    Plugins plugins = new Plugins(pluginFactory, runtimeOptions);
    StrictAware plugin = mock(StrictAware.class);
    plugins.addPlugin(plugin);
    verify(plugin).setStrict(true);
}
Also used : RuntimeOptions(io.cucumber.core.options.RuntimeOptions) StrictAware(io.cucumber.plugin.StrictAware) Test(org.junit.jupiter.api.Test)

Aggregations

StrictAware (io.cucumber.plugin.StrictAware)2 RuntimeOptions (io.cucumber.core.options.RuntimeOptions)1 Test (org.junit.jupiter.api.Test)1