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

net.thucydides.core.requirements.SerenityTestCaseFinder Maven / Gradle / Ivy

package net.thucydides.core.requirements;

import com.google.common.collect.ImmutableList;
import org.junit.runner.RunWith;

import java.util.List;

/**
 * Created by john on 22/07/2015.
 */
public class SerenityTestCaseFinder {
    private final List LEGAL_SERENITY_RUNNER_NAMES = ImmutableList.of("SerenityRunner", "ThucydidesRunner");

    public boolean isSerenityTestCase(Class testClass) {
        RunWith runWithAnnotation = testClass.getAnnotation(RunWith.class);
        if (runWithAnnotation != null) {
            return LEGAL_SERENITY_RUNNER_NAMES.contains(runWithAnnotation.value().getSimpleName());
        }
        return false;
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy