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

net.serenitybdd.screenplay.SilentTask 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.function.Consumer;

import static java.util.Arrays.asList;

/**
 * Perform a task or sequence of tasks without having it appear in the reports.
 */
public class SilentTask {

    static  SilentPerformableFunction where(Consumer performableOperation) {
        return Instrumented.instanceOf(SilentPerformableFunction.class).withProperties(performableOperation);
    }

    public static  AnonymousTask where(T... steps) {
        return Instrumented.instanceOf(AnonymousTask.class)
                           .withProperties("Anonymous task",  asList(steps)).withNoReporting();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy