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

com.nordstrom.automation.junit.MethodWatcher Maven / Gradle / Ivy

There is a newer version: 17.1.1
Show newest version
package com.nordstrom.automation.junit;

import org.junit.internal.runners.model.ReflectiveCallable;

/**
 * This interface defines the methods implemented by JUnit method watchers.
 */
public interface MethodWatcher extends TypeDiscloser, JUnitWatcher {

    /**
     * Invoked before each test or configuration method is invoked.
     * 
     * @param runner JUnit test runner
     * @param child child object of {@code runner} that is being invoked
     * @param callable {@link ReflectiveCallable} object being intercepted
     */
    void beforeInvocation(Object runner, T child, ReflectiveCallable callable);

    /**
     * Invoked after each test or configuration method is invoked.
     * 
     * @param runner JUnit test runner
     * @param child child object of {@code runner} that was just invoked
     * @param callable {@link ReflectiveCallable} object being intercepted
     * @param thrown exception thrown by method; {@code null} on normal completion
     */
    void afterInvocation(Object runner, T child, ReflectiveCallable callable, Throwable thrown);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy