![JAR search and dependency download from the Maven repository](/logo.png)
net.serenitybdd.screenplay.conditions.Check 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.conditions;
import net.serenitybdd.screenplay.Question;
import org.hamcrest.Matcher;
public class Check {
public static ConditionalPerformable whether(Boolean condition) {
return new ConditionalPerformableOnBoolean(condition);
}
public static ConditionalPerformable whether(Question condition) {
return new ConditionalPerformableOnQuestion(condition);
}
public static ConditionalPerformable whether(Question extends T> question, Matcher matcher) {
Question condition = actor -> matcher.matches(question.answeredBy(actor));
return new ConditionalPerformableOnQuestion(condition);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy