
net.serenitybdd.screenplay.ConditionalPerformable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serenity-screenplay Show documentation
Show all versions of serenity-screenplay Show documentation
Support for the User Journey pattern in Serenity
package net.serenitybdd.screenplay;
public class ConditionalPerformable implements Performable {
private final Question shouldNotPerform;
private final Performable task;
public ConditionalPerformable(Question shouldNotPerform, Performable task) {
this.shouldNotPerform = shouldNotPerform;
this.task = task;
}
@Override
public void performAs(T actor) {
if (shouldNotPerform.answeredBy(actor)) { return; }
task.performAs(actor);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy