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

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

There is a newer version: 4.2.9
Show newest version
package net.serenitybdd.screenplay;

import net.serenitybdd.core.steps.Instrumented;

import java.util.Arrays;
import java.util.function.Consumer;

/**
 * A marker class to indicate that a Performable represents a system interaction (action),
 * rather than a business task.
 */
@SuppressWarnings("deprecation")
public interface Interaction extends Performable {
    static AnonymousInteraction where(String title, Performable... steps) {
        return Instrumented.instanceOf(AnonymousInteraction.class).withProperties(title, Arrays.asList(steps));
    }

    static AnonymousInteraction where(String title, Consumer performableOperation) {
        return Instrumented.instanceOf(AnonymousInteraction.class).withProperties(title, performableOperation);
    }

    static AnonymousInteraction thatPerforms(String title, Runnable performableOperation) {
        return Instrumented.instanceOf(AnonymousInteraction.class).withProperties(title, performableOperation);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy