Package net.jsunit.interceptor

Source Code of net.jsunit.interceptor.BrowserTestRunnerInterceptor

package net.jsunit.interceptor;

import com.opensymphony.xwork.Action;
import net.jsunit.BrowserTestRunner;
import net.jsunit.action.BrowserTestRunnerAware;

public class BrowserTestRunnerInterceptor extends JsUnitInterceptor {

    private static BrowserTestRunnerSource source = new DefaultBrowserTestRunnerSource();

    public static void setBrowserTestRunnerSource(BrowserTestRunnerSource aSource) {
        source = aSource;
    }

    protected void execute(Action action) throws Exception {
        if (action instanceof BrowserTestRunnerAware) {
            BrowserTestRunnerAware aware = (BrowserTestRunnerAware) action;
            BrowserTestRunner runner = source.getRunner();
            aware.setBrowserTestRunner(runner);
        }
    }

}
TOP

Related Classes of net.jsunit.interceptor.BrowserTestRunnerInterceptor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.