Line 28 is:
mv = c.handleRequest(request, new MockHttpServletResponse());
mpinheiro wrote:
>
> Hi All,
>
> Im having a trouble with all of mine form controllers test because when
> they try to run handleRequest of a FormController, it is null. Below is a
> example.
> I set the bean definition in dispatcher-servlet and a urlmapping value as
>
> /acaoForm.html=acaoFormController.
>
> What is wrong? Im sure thats a simple mistake.
>
> thanks!
>
> public class AcaoFormControllerTest extends BaseControllerTestCase {
> private AcaoFormController c;
>
> private MockHttpServletRequest request;
>
> private ModelAndView mv;
>
> protected void setAcaoFormController(AcaoFormController form) {
> this.c = form;
> }
>
> public void testEdit() throws Exception {
> log.debug("testing edit...");
> request = newGet("/editAcao.html");
> request.addParameter("id", "6");
>
> mv = c.handleRequest(request, new MockHttpServletResponse());
>
> assertEquals("acaoForm", mv.getViewName());
> }
>
>
> Here is the dispatch configuration:
>
> <bean id="acaoFormController"
> class="br.pucrio.inf.les.investprofile.webapp.controller.AcaoFormController">
> <property name="acaoManager" ref="acaoManager"/>
> <property name="successView" value="redirect:acaoList.html"/>
> </bean>
>
--
View this message in context:
http://www.nabble.com/formcontroller-test-get-null-formcontroller-tp16787267s2369p16916533.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]