Search in sources :

Example 21 with PluginOption

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

the class PluginFactoryTest method instantiates_custom_string_arg_plugin.

@Test
void instantiates_custom_string_arg_plugin() {
    PluginOption option = parse(WantsString.class.getName() + ":hello");
    WantsString plugin = (WantsString) fc.create(option);
    assertThat(plugin.arg, is(equalTo("hello")));
}
Also used : PluginOption(io.cucumber.core.options.PluginOption) Test(org.junit.jupiter.api.Test)

Example 22 with PluginOption

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

the class PluginFactoryTest method instantiates_junit_plugin_with_file_arg.

@Test
void instantiates_junit_plugin_with_file_arg() {
    PluginOption option = parse("junit:" + tmp.resolve("cucumber.xml"));
    plugin = fc.create(option);
    assertThat(plugin.getClass(), is(equalTo(JUnitFormatter.class)));
}
Also used : PluginOption(io.cucumber.core.options.PluginOption) Test(org.junit.jupiter.api.Test)

Example 23 with PluginOption

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

the class PluginFactoryTest method instantiates_timeline_plugin_with_dir_arg.

@Test
void instantiates_timeline_plugin_with_dir_arg() {
    PluginOption option = parse("timeline:" + tmp.toAbsolutePath());
    plugin = fc.create(option);
    assertThat(plugin.getClass(), is(equalTo(TimelineFormatter.class)));
}
Also used : PluginOption(io.cucumber.core.options.PluginOption) Test(org.junit.jupiter.api.Test)

Aggregations

PluginOption (io.cucumber.core.options.PluginOption)23 Test (org.junit.jupiter.api.Test)23 CucumberException (io.cucumber.core.exception.CucumberException)5 Path (java.nio.file.Path)4 Executable (org.junit.jupiter.api.function.Executable)4 EventBus (io.cucumber.core.eventbus.EventBus)1 ClockStub (io.cucumber.core.runner.ClockStub)1 TimeServiceEventBus (io.cucumber.core.runtime.TimeServiceEventBus)1 PickleStepTestStep (io.cucumber.plugin.event.PickleStepTestStep)1 Result (io.cucumber.plugin.event.Result)1 TestCase (io.cucumber.plugin.event.TestCase)1 TestStepFinished (io.cucumber.plugin.event.TestStepFinished)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 File (java.io.File)1 OutputStream (java.io.OutputStream)1 PrintStream (java.io.PrintStream)1 UUID (java.util.UUID)1