Firstly, when starting a new topic it's a better idea to post a new message rather than replying to an existing one. Anyone not following the thread you reply on wont see you message if you do that.

As far as your problem goes, it's not clear what the problem is because it doesn't look like you posted all the relevant code: what does verifyForward("display") do?

At a guess, I'd say the problem is that whatever is supplying the expected value ('/myContentRoot/myApp.display.page') is wrong. That's a tile name, which is an internal value.

L.

Carl Smith wrote:
Is there any helps here? Thank you in advance.

Carl Smith <[EMAIL PROTECTED]> wrote:
I am sorry for this a little long question, but you will be finding it 
interesting... Simply put, I have (1),(2) and (3), then we I run struts 
testing, I got error described as (4)



(1) item in struts-config.xml
type="my.actions.myAction" name="myForm" scope="request" validate="true" input="myInput">



(2) item in tiles-defs.xml












(3) I was trying to test MyAction.java (not shown here since it is just some simple stuff),
I wrote the following struts testing case:


public class MyActionTest extends CactusStrutsTestCase {
public MyActionTest(String testingName){
super(testingName);
}

public void begin(WebRequest req){
req.setAuthentication(new BasicAuthentication("username","password"));
}

public void testDisplay() throws Exception {
setRequestPathInfo("/MyAction");
actionPerform();
// after actionPerform(), MyAction is really forwarding to myApp.display.page
// so the testing should have passed, but it did not, see below error
verifyForward("display");

}

}



(4)
junit.framework.AssertionFailedError: was expecting 
'/myContentRoot/myApp.display.page' but received 
'/myContentRoot/jsp/default.jsp'
at servletunit.struts.Common.verifyForwardPath(Common.java:170)
at 
servletunit.struts.CactusStrutsTestCase.verifyForward(CactusStrutsTestCase.java:432)


However, if I delete extends="myDefault" from the configure for 
myApp.display.page in tiles-defs.xml, then the test case passed.
It seems there is an issue with the tiles extend, why this is happening? Do you 
have any idea or workaround?




---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to