net.serenitybdd.junit.runners.TestMethodConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serenity-junit Show documentation
Show all versions of serenity-junit Show documentation
Serenity JUnit integration
package net.serenitybdd.junit.runners;
import net.serenitybdd.annotations.Manual;
import net.serenitybdd.annotations.Pending;
import net.thucydides.model.domain.TestResult;
import org.junit.Ignore;
import org.junit.runners.model.FrameworkMethod;
public class TestMethodConfiguration {
private final FrameworkMethod method;
public TestMethodConfiguration(FrameworkMethod method) {
this.method = method;
}
public static TestMethodConfiguration forMethod(FrameworkMethod method) {
return new TestMethodConfiguration(method);
}
public boolean isManual() {
return method.getAnnotation(Manual.class) != null;
}
public TestResult getManualResult() {
return method.getAnnotation(Manual.class).result();
}
public boolean isIgnored() {
return method.getAnnotation(Ignore.class) != null;
}
public boolean isPending() {
return method.getAnnotation(Pending.class) != null;
}
public String getManualResultReason() {
return method.getAnnotation(Manual.class).reason();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy