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

net.thucydides.core.steps.DataDrivenStep Maven / Gradle / Ivy

There is a newer version: 4.2.8
Show newest version
package net.thucydides.core.steps;

/**
 * Keep track of whether the current thread is running a data-driven step or not.
 */
public class DataDrivenStep {
    private static ThreadLocal dataDrivenStepInProgress = new ThreadLocal();

    public static void startDataDrivenStep() {
        dataDrivenStepInProgress.set(true);
    }

    public static void endDataDrivenStep() {
        dataDrivenStepInProgress.set(false);
    }

    public static boolean inProgress() {
        if (dataDrivenStepInProgress.get() == null) {
            return false;
        } else {
            return dataDrivenStepInProgress.get();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy