Hi,
I have a servlet to test that need severals parameters in the request :
- an action, that specify the action to perform
- an objectId, that specify on wich object the action is to be performed

I need to perform a test where I must call the servlet to create an
objectId, then call this servlet with the request containing this queryId as
a parameter.

Something like :

public void testXXX() {
        MyServlet myServ = new MyServlet() ;
        String objectId = myServ.createNewObject() ;
        request.setParameter("action", "someAction") ;
        request.setParameter("objectId", objectId) ;
        myServ.dispatch(request, response) ;
}

Unfortunately, Cactus request does not allow modifying parameters. So the
above code don't work


(Another possibility would be to first perform a test and get the objectId
in endXXX(), then perform a second test passing the queryId in beginXXX, but
I understood this is not in Cactus spirit)

Do you have any idea (or is it not considered a unit test :-)) ?

Thanks,
Marc

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

Reply via email to