Package org.springframework.mock.web

Examples of org.springframework.mock.web.MockHttpServletRequest.clearAttributes()


        RequestContextHolder.getRequestAttributes().getAttribute("test", RequestAttributes.SCOPE_REQUEST));
    MockRunnable runnable = new MockRunnable();
    RequestContextHolder.getRequestAttributes().registerDestructionCallback(
        "test", runnable, RequestAttributes.SCOPE_REQUEST);

    request.clearAttributes();
    listener.requestDestroyed(new ServletRequestEvent(context, request));
    assertNull(RequestContextHolder.getRequestAttributes());
    assertTrue(runnable.wasExecuted());
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.