net.serenitybdd.screenplay.SilentPerformableFunction Maven / Gradle / Ivy
package net.serenitybdd.screenplay;
import net.serenitybdd.markers.CanBeSilent;
import java.util.function.Consumer;
public class SilentPerformableFunction implements Performable, CanBeSilent {
private final Consumer actions;
public SilentPerformableFunction(Consumer actions) {
this.actions = actions;
}
@Override
public void performAs(T actor) {
actions.accept(actor);
}
@Override
public boolean isSilent() {
return true;
}
}