net.serenitybdd.jbehave.SerenityCandidateSteps Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serenity-jbehave Show documentation
Show all versions of serenity-jbehave Show documentation
Serenity JBehave integration
package net.serenitybdd.jbehave;
import ch.lambdaj.function.convert.Converter;
import org.jbehave.core.annotations.ScenarioType;
import org.jbehave.core.configuration.Configuration;
import org.jbehave.core.steps.BeforeOrAfterStep;
import org.jbehave.core.steps.CandidateSteps;
import org.jbehave.core.steps.StepCandidate;
import java.util.List;
import static ch.lambdaj.Lambda.convert;
public class SerenityCandidateSteps implements CandidateSteps {
private final CandidateSteps candidateSteps;
public SerenityCandidateSteps(CandidateSteps candidateSteps) {
this.candidateSteps = candidateSteps;
}
public List listCandidates() {
return convert(candidateSteps.listCandidates(), toSerenityStepCandidates());
}
private Converter toSerenityStepCandidates() {
return new Converter() {
public StepCandidate convert(StepCandidate stepCandidate) {
return new SerenityStepCandidate(stepCandidate);
}
};
}
public List listBeforeOrAfterStories() {
return candidateSteps.listBeforeOrAfterStories();
}
public List listBeforeOrAfterStory(boolean givenStory) {
return candidateSteps.listBeforeOrAfterStory(givenStory);
}
public List listBeforeOrAfterScenario(ScenarioType type) {
return candidateSteps.listBeforeOrAfterScenario(type);
}
public Configuration configuration() {
return candidateSteps.configuration();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy