protected void setUp() throws Exception {
    super.setUp();
    param = new HashMap<>();

    interceptor = new MultiselectInterceptor();
    ai = new MockActionInvocation();
    ai.setInvocationContext(ActionContext.getContext());
    ActionContext.getContext().setParameters(HttpParameters.create(param).build());
  }
Exemplo n.º 2
0
  protected void tearDown() throws Exception {
    stack = null;
    invocation = null;
    context = null;
    response = null;
    writer = null;
    stringWriter = null;
    servletContext = null;

    super.tearDown();
  }
Exemplo n.º 3
0
  protected void setUp() throws Exception {
    super.setUp();

    stringWriter = new StringWriter();
    writer = new PrintWriter(stringWriter);
    response = new StrutsMockHttpServletResponse();
    response.setWriter(writer);
    servletContext = new StrutsMockServletContext();
    stack = ActionContext.getContext().getValueStack();
    context = new ActionContext(stack.getContext());
    context.put(StrutsStatics.HTTP_RESPONSE, response);
    context.put(StrutsStatics.SERVLET_CONTEXT, servletContext);
    invocation = new MockActionInvocation();
    invocation.setStack(stack);
    invocation.setInvocationContext(context);
  }