package com.consol.citrus;

/**
 * @author Christoph Deppisch
 */
public interface TestActionRunner {

    /**
     * Runs given test action.
     * @param action
     * @param <T>
     * @return
     */
    default <T extends TestAction> T run(T action) {
        return run((TestActionBuilder<T>) () -> action);
    }

    /**
     * Builds and runs given test action.
     * @param builder
     * @param <T>
     * @return
     */
    <T extends TestAction> T run(TestActionBuilder<T> builder);

    /**
     * Apply test behavior on this test action runner.
     * @param behavior
     * @return
     */
    <T extends TestAction> TestActionBuilder<T> applyBehavior(TestBehavior behavior);
}

@@ -314,16 +314,452 @@
 %0A    %7D%0A%0A
+    /**%0A     * Runs given test action.%0A     * @param action%0A     * @param %3CT%3E%0A     * @return%0A     */%0A    default %3CT extends TestAction%3E T $(T action) %7B%0A        return run((TestActionBuilder%3CT%3E) () -%3E action);%0A    %7D%0A%0A    /**%0A     * Builds and runs given test action.%0A     * @param builder%0A     * @param %3CT%3E%0A     * @return%0A     */%0A    default %3CT extends TestAction%3E T $(TestActionBuilder%3CT%3E builder) %7B%0A        return run(builder);%0A    %7D%0A%0A
     /**%0A

Add short hand for run methods on test action runner