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

cucumber.api.guice.CucumberScopes 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.SequentialScenarioScope;

/**
 * Creates an instance of {@link ScenarioScope} for use when declaring bindings
 * in implementations of {@link Module}.
 * 

* Note that when binding objects to the scenario scope it is recommended to bind * them to the {@link ScenarioScoped} annotation instead. E.g: * * bind(ScenarioScopedObject.class).in(ScenarioScoped.class); */ public class CucumberScopes { /** * A convenient instance of {@link ScenarioScope}. Should only be used * in combination with {@link CucumberModules#SCENARIO}. *

* Note that using this in combination with parallel execution results in * undefined behaviour. * * @deprecated please use {@link #createScenarioScope()} instead */ @Deprecated public static final ScenarioScope SCENARIO = createScenarioScope(); /** * Creates a new instance of a ScenarioScope. * * @return a new instance of a ScenarioScope. */ public static ScenarioScope createScenarioScope() { return new SequentialScenarioScope(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy