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

org.fluentlenium.cucumber.adapter.CucumberSharedDriverStrategyReader Maven / Gradle / Ivy

There is a newer version: 5.0.4
Show newest version
package org.fluentlenium.cucumber.adapter;

import org.fluentlenium.adapter.util.SharedDriverStrategy;
import org.fluentlenium.adapter.util.SharedDriverStrategyReader;
import org.fluentlenium.cucumber.adapter.util.SharedDriver;

public class CucumberSharedDriverStrategyReader implements SharedDriverStrategyReader {
    @Override
    public SharedDriverStrategy getSharedDriverStrategy(Class clazz, String testName) {
        SharedDriver sharedDriver = clazz.getAnnotation(SharedDriver.class);
        if (sharedDriver == null) {
            return SharedDriverStrategy.PER_CLASS;
        }

        if (sharedDriver.type() == SharedDriver.SharedType.ONCE) {
            return SharedDriverStrategy.ONCE;
        } else {
            return SharedDriverStrategy.PER_CLASS;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy