Class TestRequest


  • public class TestRequest
    extends Request
    Version of Request for testing purposes. Arranges for all output to be captured in one place so the ouput of a test may be compared with the expected output.
    • Constructor Detail

      • TestRequest

        public TestRequest​(Server server,
                           java.lang.String request)
                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • put

        public java.lang.Object put​(java.lang.String key,
                                    java.lang.String value)
      • log

        public java.lang.String log()
      • result

        public java.lang.String result()
      • log

        public void log​(int level,
                        java.lang.Object obj,
                        java.lang.String message)
        Description copied from class: Request
        Logs a message by calling Server.log. Typically a message is generated on the console or in a log file, if the level is less than the current server log setting.
        Overrides:
        log in class Request
        Parameters:
        level - The severity of the message.
        obj - The object that the message relates to.
        message - The message that will be logged.
        See Also:
        Server.log(int, Object, String)