
net.serenitybdd.screenplay.AnonymousPerformableRunnable 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
The newest version!
package net.serenitybdd.screenplay;
import net.serenitybdd.markers.CanBeSilent;
import net.serenitybdd.annotations.Step;
import java.util.HashMap;
import java.util.Map;
public class AnonymousPerformableRunnable implements Performable, CanBeSilent {
private final String title;
private final Map fieldValues = new HashMap();
private final Runnable actions;
private boolean isSilent = false;
public AnonymousPerformableRunnable(String title, Runnable actions) {
this.title = title;
this.actions = actions;
}
@Override
@Step("!#title")
public void performAs(T actor) {
actions.run();
}
@Override
public boolean isSilent() {
return isSilent;
}
public AnonymousPerformableRunnable withNoReporting() {
this.isSilent = true;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy