Search in sources :

Example 11 with RuntimeOptions

use of io.cucumber.core.options.RuntimeOptions 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);
}
Also used : ColorAware(io.cucumber.plugin.ColorAware) RuntimeOptions(io.cucumber.core.options.RuntimeOptions) Test(org.junit.jupiter.api.Test)

Example 12 with RuntimeOptions

use of io.cucumber.core.options.RuntimeOptions in project cucumber-jvm by cucumber.

the class PluginsTest method shouldSetNonConcurrentEventListener.

@Test
void shouldSetNonConcurrentEventListener() {
    RuntimeOptions runtimeOptions = RuntimeOptions.defaultOptions();
    Plugins plugins = new Plugins(pluginFactory, runtimeOptions);
    EventListener plugin = mock(EventListener.class);
    plugins.addPlugin(plugin);
    plugins.setSerialEventBusOnEventListenerPlugins(rootEventPublisher);
    verify(plugin, times(1)).setEventPublisher(eventPublisher.capture());
    assertThat(eventPublisher.getValue().getClass(), is(equalTo(CanonicalOrderEventPublisher.class)));
}
Also used : ConcurrentEventListener(io.cucumber.plugin.ConcurrentEventListener) EventListener(io.cucumber.plugin.EventListener) RuntimeOptions(io.cucumber.core.options.RuntimeOptions) Test(org.junit.jupiter.api.Test)

Example 13 with RuntimeOptions

use of io.cucumber.core.options.RuntimeOptions 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

RuntimeOptions (io.cucumber.core.options.RuntimeOptions)13 Test (org.junit.jupiter.api.Test)9 UUID (java.util.UUID)4 EventBus (io.cucumber.core.eventbus.EventBus)3 Filters (io.cucumber.core.filter.Filters)3 RuntimeOptionsBuilder (io.cucumber.core.options.RuntimeOptionsBuilder)3 CucumberExecutionContext (io.cucumber.core.runtime.CucumberExecutionContext)3 ExitStatus (io.cucumber.core.runtime.ExitStatus)3 ThreadLocalRunnerSupplier (io.cucumber.core.runtime.ThreadLocalRunnerSupplier)3 TimeServiceEventBus (io.cucumber.core.runtime.TimeServiceEventBus)3 ConcurrentEventListener (io.cucumber.plugin.ConcurrentEventListener)3 Glue (io.cucumber.core.backend.Glue)2 Feature (io.cucumber.core.gherkin.Feature)2 RunnerSupplier (io.cucumber.core.runtime.RunnerSupplier)2 EventListener (io.cucumber.plugin.EventListener)2 Collections.emptyList (java.util.Collections.emptyList)2 Collections.singletonList (java.util.Collections.singletonList)2 List (java.util.List)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2 HookDefinition (io.cucumber.core.backend.HookDefinition)1