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

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

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

import net.serenitybdd.annotations.Step;
import org.apache.commons.lang3.StringUtils;

import java.lang.reflect.Method;
import java.util.Optional;

public class StepName {

    public static Optional fromStepAnnotationIn(final Method testMethod) {
        Step step = testMethod.getAnnotation(Step.class);
        if ((step != null) && (!StringUtils.isEmpty(step.value()))) {
            return Optional.of(step.value());
        }
        return Optional.empty();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy