Class PseudoServlet


  • public abstract class PseudoServlet
    extends java.lang.Object
    A basic simulated servlet for testing the HttpUnit library.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONTENTS  
    • Constructor Summary

      Constructors 
      Constructor Description
      PseudoServlet()  
    • Constructor Detail

      • PseudoServlet

        public PseudoServlet()
    • Method Detail

      • getResponse

        public WebResource getResponse​(java.lang.String methodType)
                                throws java.io.IOException
        Returns a resource object as a result of a get request.
        Throws:
        java.io.IOException
      • getGetResponse

        public WebResource getGetResponse()
                                   throws java.io.IOException
        Returns a resource object as a result of a get request.
        Throws:
        java.io.IOException
      • getPostResponse

        public WebResource getPostResponse()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getPutResponse

        public WebResource getPutResponse()
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getHeader

        protected java.lang.String getHeader​(java.lang.String name)
        Returns the header with the specified name. If no such header exists, will return null.
      • getParameter

        protected java.lang.String[] getParameter​(java.lang.String name)
        Returns the values for the parameter with the specified name. If no values exist will return null.
      • getReader

        protected java.io.Reader getReader()
        Returns a reader for the body of the request.
      • getBody

        protected byte[] getBody()