All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.serenitybdd.screenplay.ConditionalPerformable Maven / Gradle / Ivy

There is a newer version: 4.2.12
Show newest version
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