Re: why the code passes Servlet container test but fails in StrutsTestCase

2016-02-14 Thread Dave Newton
This shouldn't even compile since you're attempting to return a value. On Feb 13, 2016 11:26 PM, "JOSE L MARTINEZ-AVIAL" wrote: > The method execute has void as a return type, instead of a String. > > 2016-02-13 2:26 GMT-05:00 小唐 <644282...@qq.com>: > > > Hi, > > > > I was trying to use StrutsTes

Re: why the code passes Servlet container test but fails in StrutsTestCase

2016-02-13 Thread JOSE L MARTINEZ-AVIAL
The method execute has void as a return type, instead of a String. 2016-02-13 2:26 GMT-05:00 小唐 <644282...@qq.com>: > Hi, > > I was trying to use StrutsTestCase to write a test for a Bean, which has a > member of String[]. The code runs perfectly in servlet container(Tomcat), > but fails as a moc

why the code passes Servlet container test but fails in StrutsTestCase

2016-02-12 Thread ????
Hi, I was trying to use StrutsTestCase to write a test for a Bean, which has a member of String[]. The code runs perfectly in servlet container(Tomcat), but fails as a mock test. In EditActionTest.java, assertNotNull("The action is null but should not be.", action) still works fine, but String