package examples;

import servletunit.struts.CactusStrutsTestCase;

public class TestCactusSuccessAction extends CactusStrutsTestCase {
    
    public void testSuccessfulLogin() {
        addRequestParameter("username", "deryl");
        addRequestParameter("password", "radar");
        setRequestPathInfo("/login");
        actionPerform();
        verifyForward("success");
        verifyForwardPath("/main/success.jsp");
        assertEquals("deryl", getSession().getAttribute("authentication"));
        verifyNoActionErrors();
    }
}
