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();
}
Aggregations