You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Li <am...@gmail.com> on 2009/05/07 12:20:57 UTC

struts 2.1.6 action test using junit-plug-in

Hey guys,

I am recently working with struts2.1.6. I was trying to test my action using
struts2.1.6 junit-plugin. It was working fine till I started using
annotation to replace XML configuration. Seem the configuration info that
was generated using annotation was not loaded by my test case.

the setUp method looks like this -------------

super.setUp();
        XmlConfigurationProvider c = new
XmlConfigurationProvider("struts.xml");
        configurationManager.addConfigurationProvider(c);
        configurationManager.reload();
        this.userRepo = userRepo;

---------------------------------

How could I tell my testcase READ configuration info that generated by
annotation pls? Thanks.


-- 
Small win by playing smart
Big win by playing honest