Class ClientAndServer

    • Constructor Detail

      • ClientAndServer

        public ClientAndServer​(Integer... ports)
      • ClientAndServer

        public ClientAndServer​(String remoteHost,
                               Integer remotePort,
                               Integer... ports)
    • Method Detail

      • isRunning

        public boolean isRunning()
        Description copied from class: MockServerClient
        Returns whether MockServer is running, if called too quickly after starting MockServer this may return false because MockServer has not yet started, to ensure MockServer has started use hasStarted()
        Overrides:
        isRunning in class MockServerClient
      • hasStarted

        public boolean hasStarted()
        Description copied from class: MockServerClient
        Returns whether MockServer has started, if called after MockServer has been stopped this method will block for 5 seconds while confirming that MockServer is not starting
        Overrides:
        hasStarted in class MockServerClient
      • stop

        public void stop()
        Description copied from class: MockServerClient
        Stop MockServer gracefully (only support for Netty version, not supported for WAR version)
        Specified by:
        stop in interface Stoppable
        Overrides:
        stop in class MockServerClient
      • getPort

        @Deprecated
        public Integer getPort()
        Deprecated.
        use getLocalPort instead of getPort
      • getLocalPort

        public Integer getLocalPort()