org.requirementsascode.FlowlessStep Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of requirementsascodecore Show documentation
Show all versions of requirementsascodecore Show documentation
Enables you to define and run executable use case specifications, in your code.
package org.requirementsascode;
import java.util.function.Predicate;
/**
* A step that is not part of a flow (i.e. no flow definition in the model).
*
* @author b_muth
*
*/
public class FlowlessStep extends Step {
FlowlessStep(String stepName, UseCase useCase, Condition optionalCondition) {
super(stepName, useCase, optionalCondition);
}
@Override
public Predicate getPredicate() {
Predicate predicate = toPredicate(getConditionOrElseTrue());
return predicate;
}
private Condition getConditionOrElseTrue() {
Condition condition = getCondition().orElse(() -> true);
return condition;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy