Class HttpClientRule

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class HttpClientRule
    extends AbstractHttpClientJUnit<HttpClientRule>
    implements org.junit.rules.TestRule
    TestRule for a HttpClient to HttpServer.
    Author:
    Daniel Sagenschneider
    • Constructor Detail

      • HttpClientRule

        public HttpClientRule()
        Instantiate for non-secure (HTTP) connection to HttpServer.
      • HttpClientRule

        public HttpClientRule​(boolean isSecure)
        Instantiate with flagging if secure (HTTPS) connection to HttpServer.
        Parameters:
        isSecure - Indicates if secure (HTTPS).
      • HttpClientRule

        public HttpClientRule​(boolean isSecure,
                              int port)
        Instantiate indicating the server port.
        Parameters:
        isSecure - Indicates if secure (HTTPS).
        port - Server port to connect.
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runner.Description description)
        Specified by:
        apply in interface org.junit.rules.TestRule