package mocks

Type Members

  1. class DoNothingFilterChain extends FilterChain with Logger

    A FilterChain that does nothing.

  2. class MockFilterConfig extends FilterConfig

    A Mock FilterConfig.

    A Mock FilterConfig. Construct with a MockServletContext and pass into LiftFilter.init

  3. class MockHttpServletRequest extends HttpServletRequest

    A Mock ServletRequest.

    A Mock ServletRequest. Change its state to create the request you are interested in. At the very least, you will need to change method and path.

    There are several things that aren't supported:

    • getRequestDispatcher - returns null always
    • getRequestedSessionId - always returns null. The related isRequestedSessionId... methods similarly all return false
    • getRealPath - simply returns the input string
  4. class MockHttpServletResponse extends HttpServletResponse

    A Mock HttpServletResponse.

    A Mock HttpServletResponse. Take a peek at it's writer or outputStream to see what lift has written in response to your request

  5. class MockHttpSession extends HttpSession

    A Mock HttpSession implementation.

  6. class MockServletContext extends ServletContext

    A Mock ServletContext.

    A Mock ServletContext. LiftFilter expects a ServletContext inside a FilterConfig

  7. class MockServletInputStream extends ServletInputStream

    A Mock ServletInputStream.

    A Mock ServletInputStream. Pass in any ol InputStream like a ByteArrayInputStream.

  8. class MockServletOutputStream extends ServletOutputStream

    A Mock ServletOutputStream.

    A Mock ServletOutputStream. Pass in any ol' OutputStream like a ByteArrayOuputStream.