Search in sources :

Example 1 with RuntimeGlue

use of cucumber.runtime.RuntimeGlue in project cucumber-jvm by cucumber.

the class FeatureRunnerTest method runFeatureWithFormatterSpy.

private String runFeatureWithFormatterSpy(CucumberFeature cucumberFeature) throws InitializationError {
    final RuntimeOptions runtimeOptions = new RuntimeOptions("");
    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    final ClasspathResourceLoader resourceLoader = new ClasspathResourceLoader(classLoader);
    final RuntimeGlue glue = mock(RuntimeGlue.class);
    final Runtime runtime = new Runtime(resourceLoader, classLoader, asList(mock(Backend.class)), runtimeOptions, new StopWatch.Stub(0l), glue);
    FormatterSpy formatterSpy = new FormatterSpy();
    FeatureRunner runner = new FeatureRunner(cucumberFeature, runtime, new JUnitReporter(formatterSpy, formatterSpy, false, new JUnitOptions(Collections.<String>emptyList())));
    runner.run(mock(RunNotifier.class));
    return formatterSpy.toString();
}
Also used : Runtime(cucumber.runtime.Runtime) RunNotifier(org.junit.runner.notification.RunNotifier) ClasspathResourceLoader(cucumber.runtime.io.ClasspathResourceLoader) RuntimeGlue(cucumber.runtime.RuntimeGlue) RuntimeOptions(cucumber.runtime.RuntimeOptions) StopWatch(cucumber.runtime.StopWatch)

Aggregations

Runtime (cucumber.runtime.Runtime)1 RuntimeGlue (cucumber.runtime.RuntimeGlue)1 RuntimeOptions (cucumber.runtime.RuntimeOptions)1 StopWatch (cucumber.runtime.StopWatch)1 ClasspathResourceLoader (cucumber.runtime.io.ClasspathResourceLoader)1 RunNotifier (org.junit.runner.notification.RunNotifier)1