use of cucumber.runtime.formatter.StrictAware in project cucumber-jvm by cucumber.
the class FormatterMissingLifecycleMethods method set_strict_on_strict_aware_formatters.
@Test
public void set_strict_on_strict_aware_formatters() throws Exception {
PluginFactory factory = mock(PluginFactory.class);
Formatter strictAwareFormatter = mock(Formatter.class, withSettings().extraInterfaces(StrictAware.class));
when(factory.create("junit:out/dir")).thenReturn(strictAwareFormatter);
RuntimeOptions options = new RuntimeOptions(new Env(), factory, asList("--strict", "--plugin", "junit:out/dir"));
options.getPlugins();
verify((StrictAware) strictAwareFormatter).setStrict(true);
}
use of cucumber.runtime.formatter.StrictAware in project cucumber-jvm by cucumber.
the class RuntimeOptions method setStrictOnStrictAwarePlugins.
private void setStrictOnStrictAwarePlugins(Object plugin) {
if (plugin instanceof StrictAware) {
StrictAware strictAware = (StrictAware) plugin;
strictAware.setStrict(strict);
}
}
Aggregations