io.cucumber.plugin.event.Status Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cucumber-plugin Show documentation
Show all versions of cucumber-plugin Show documentation
Plugin interface for Cucumber-JVM
package io.cucumber.plugin.event;
import org.apiguardian.api.API;
@API(status = API.Status.STABLE)
public enum Status {
PASSED,
SKIPPED,
PENDING,
UNDEFINED,
AMBIGUOUS,
FAILED,
UNUSED;
public boolean is(Status status) {
return this == status;
}
public boolean isOk(boolean isStrict) {
return hasAlwaysOkStatus() || !isStrict && hasOkWhenNotStrictStatus();
}
private boolean hasAlwaysOkStatus() {
return is(Status.PASSED) || is(Status.SKIPPED);
}
private boolean hasOkWhenNotStrictStatus() {
return is(Status.UNDEFINED) || is(Status.PENDING);
}
}