
net.serenitybdd.screenplay.InteractiveConsequence 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;
import org.hamcrest.Matcher;
import static net.serenitybdd.screenplay.GivenWhenThen.seeThat;
/**
* An InteractiveConsequence is a convenience class designed to make it easier to write consequences that need to be
* preceded by actions, for example when performing a number of soft assertions on a page.
*/
public class InteractiveConsequence {
private Performable[] actions;
public InteractiveConsequence(Performable[] actions) {
this.actions = actions;
}
public static InteractiveConsequence attemptTo(Performable... actions) {
return new InteractiveConsequence(actions);
}
public Consequence thenCheckThat(Question extends T> actual, Matcher expected) {
return seeThat(actual, expected).after(actions);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy