
net.masterthought.cucumber.json.support.Status Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cucumber-reporting Show documentation
Show all versions of cucumber-reporting Show documentation
Provides pretty html reports for Cucumber (Behaviour-Driven Development). It works by generating html from the
cucumber json report formatter. So can be used anywhere a json report is generated. Current use is in the
cucumber jenkins plugin and a maven mojo to generate the same report from mvn command line when running locally.
package net.masterthought.cucumber.json.support;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import net.masterthought.cucumber.json.deserializers.StatusDeserializer;
/**
* Defines all possible statuses provided by cucumber library.
*
* @author Damian Szczepanik (damianszczepanik@github)
*/
@JsonDeserialize(using = StatusDeserializer.class)
public enum Status {
PASSED,
FAILED,
SKIPPED,
PENDING,
UNDEFINED;
/**
* Returns name of the status converted to lower case characters.
*/
public String getRawName() {
return name().toLowerCase();
}
/** Returns name of the status changing first letter to upper case character. */
public String getLabel() {
return name().substring(0, 1).toUpperCase() + name().substring(1).toLowerCase();
}
/** Returns true if status is equal to {@link #PASSED}. */
public boolean isPassed() {
return this == PASSED;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy