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

com.tngtech.jgiven.impl.ScenarioHolder Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package com.tngtech.jgiven.impl;

public class ScenarioHolder {
    private final ThreadLocal scenario = new ThreadLocal();

    private static final ScenarioHolder INSTANCE = new ScenarioHolder();

    public static ScenarioHolder get() {
        return INSTANCE;
    }

    public ScenarioBase getScenarioOfCurrentThread() {
        return scenario.get();
    }

    public void setScenarioOfCurrentThread(ScenarioBase scenarioBase) {
        scenario.set(scenarioBase);
    }

    public void removeScenarioOfCurrentThread() {
        scenario.remove();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy