cucumber.api.CucumberOptions Java Examples

The following examples show how to use cucumber.api.CucumberOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RunnerOptions.java    From karate with MIT License 6 votes vote down vote up
public static RunnerOptions fromAnnotationAndSystemProperties(Class<?> clazz) {
    List<String> tags = null;
    List<String> features = null;
    KarateOptions ko = clazz.getAnnotation(KarateOptions.class);
    if (ko == null) {
        CucumberOptions co = clazz.getAnnotation(CucumberOptions.class);
        if (co != null) {
            tags = Arrays.asList(co.tags());
            features = Arrays.asList(co.features());
        }
    } else {
        tags = Arrays.asList(ko.tags());
        features = Arrays.asList(ko.features());
    }
    return fromAnnotationAndSystemProperties(features, tags, clazz);
}