All,

I am looking to test a tag which sets a session attribute based on a request 
parameter. I need to be able to test multiple requests in the same test, something 
like the following:

public void beginTestTwice(WebRequest wRequest) {
        wRequest.addParameter("lang", "es");
}

public void testTwiceWithSpanish() throws Exception {
        htmlTag.doStartTag();
        assertEquals("es", request.getSession().getAttribute("lang"));

        // Need to clear request parameter here, otherwise following assertion fails
        assertNull(request.getParameter("lang"));
        htmlTag.doStartTag();
        assertEquals("es", request.getSession().getAttribute("lang"));
}

The problem is that I cannot find a way to clear the request parameter either in the 
test method or the end method.

Thanks in advance,

-= James

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

Reply via email to