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

cucumber.api.guice.CucumberModules Maven / Gradle / Ivy

There is a newer version: 7.19.0
Show newest version
package cucumber.api.guice;

import com.google.inject.Module;
import cucumber.runtime.java.guice.ScenarioScope;
import cucumber.runtime.java.guice.ScenarioScoped;
import cucumber.runtime.java.guice.impl.ScenarioModule;

/**
 * Provides a convenient {@link Module} instance that contains bindings for
 * {@link ScenarioScoped} annotation and for {@link ScenarioScope}.
 */
public class CucumberModules {
    /**
     * A convenient instance of {@link Module}. Should only be used
     * in combination with {@link CucumberScopes#SCENARIO}.
     * 

* Note that using this in combination with parallel execution results in * undefined behaviour. * * @deprecated please use {@link #createScenarioModule()} instead */ @Deprecated public static final Module SCENARIO = createScenarioModule(); public static Module createScenarioModule() { return new ScenarioModule(CucumberScopes.createScenarioScope()); } public static Module createScenarioModule(ScenarioScope scenarioScope) { return new ScenarioModule(scenarioScope); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy