Hello All,
I am using 1.9.4 webwork version.
Here is my code...
---------------------------------
public class ImageActionTest extends BaseActionTestCase {
private ImageAction action;
protected void setup() throws Exception {
super.setUp();
action = (ImageAction) ctx.getBean("imageAction");
log.debug("richard 1..." + action);
log.debug("richard 2..." + ctx);
System.out.println("richard 1..." + action);
System.out.println("richard 2..." + ctx);
}
protected void tearDown() throws Exception {
super.tearDown();
action = null;
}
public void testEdit() throws Exception {
log.debug("testing edit..." + action);
log.debug("testing edit..." + ctx.containsBean("imageAction") );
action = (ImageAction) ctx.getBean("imageAction");
-----------------------
My problem is I am getting nullpointerexception on my tests.
My question is how and when does the setup() method gets executed?
I ask this because this line...
log.debug("testing edit..." + action);
from ImageActionTest shows that the action member is null while this line..
log.debug("testing edit..." + ctx.containsBean("imageAction") );
prints true and after doing this ...action = (ImageAction)
ctx.getBean("imageAction");
I can get the imageAction bean.
Please advise, any help is appreciated.
Thanks
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]