FileDocCategorySizeDatePackage
CreateSessionInterceptorTest.javaAPI DocExample1991Mon Jul 23 13:26:18 BST 2007org.apache.struts2.interceptor

CreateSessionInterceptorTest

public class CreateSessionInterceptorTest extends org.apache.struts2.StrutsTestCase
Test case for CreateSessionInterceptor.

Fields Summary
Constructors Summary
Methods Summary
public voidtestCreateSession()

        Mock httpServletRequestMock = new Mock(HttpServletRequest.class);
        httpServletRequestMock.expects(new InvokeOnceMatcher()).method("getSession").with(new IsEqual(Boolean.TRUE));
        HttpServletRequest request = (HttpServletRequest) httpServletRequestMock.proxy();

        ServletActionContext.setRequest(request);

        CreateSessionInterceptor interceptor = new CreateSessionInterceptor();
        interceptor.intercept(new MockActionInvocation());

        httpServletRequestMock.verify();