All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rest.RestRuntimeOptions Maven / Gradle / Ivy

Go to download

Rest Cucumber allows you to attach a rest client for retrieval of Cucumber feature files and posting of Cucumber test results

There is a newer version: 1.3
Show newest version
package rest;

import static rest.RestCucumberFeatureLoader.load;
import gherkin.formatter.Formatter;
import gherkin.formatter.Reporter;
import java.util.List;
import cucumber.runtime.RuntimeOptions;
import cucumber.runtime.io.ResourceLoader;
import cucumber.runtime.model.CucumberFeature;

public class RestRuntimeOptions {
   private RuntimeOptions runtimeOptions;

   public RestRuntimeOptions(RuntimeOptions runtimeOptions) {
      this.runtimeOptions = runtimeOptions;
   }

   public List cucumberFeatures(ResourceLoader resourceLoader) {
      if (resourceLoader instanceof RestMultiLoader) {
         return load(resourceLoader, runtimeOptions.getFeaturePaths(),
            runtimeOptions.getFilters(), System.out);
      }
      return CucumberFeature.load(resourceLoader, runtimeOptions.getFeaturePaths(),
         runtimeOptions.getFilters());
   }

   public Reporter reporter(ClassLoader classLoader) {
      return runtimeOptions.reporter(classLoader);
   }

   public Formatter formatter(ClassLoader classLoader) {
      return runtimeOptions.formatter(classLoader);
   }

   public boolean isStrict() {
      return runtimeOptions.isStrict();
   }

   public RuntimeOptions getRuntimeOptions() {
      return runtimeOptions;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy