FileDocCategorySizeDatePackage
StrutsTestCaseHelper.javaAPI DocExample1952Mon Jul 23 13:26:56 BST 2007org.apache.struts2.util

StrutsTestCaseHelper

public class StrutsTestCaseHelper extends Object
Generic test setup methods to be used with any unit testing framework.

Fields Summary
Constructors Summary
Methods Summary
public static org.apache.struts2.dispatcher.DispatcherinitDispatcher(java.util.Map params)

        if (params == null) {
            params = new HashMap<String,String>();
        }
        Dispatcher du = new Dispatcher(new MockServletContext(), params);
        du.init();
        Dispatcher.setInstance(du);
        return du;
    
public static voidsetUp()
Sets up the configuration settings, XWork configuration, and message resources

        LocalizedTextUtil.clearDefaultResourceBundles();
    
public static voidtearDown()

        Dispatcher.setInstance(null);