Class MockProxyServer

java.lang.Object
org.junit.rules.ExternalResource
com.atlassian.crowd.acceptance.utils.proxy.MockProxyServer
All Implemented Interfaces:
org.junit.rules.TestRule

public class MockProxyServer extends org.junit.rules.ExternalResource
Creates a proxy server, that allows verifying expected calls and returning expected responses without calling the remote server. The server is automatically shut down once the test finishes
  • Field Details

  • Constructor Details

  • Method Details

    • getPort

      public int getPort()
    • getServer

      public org.mockserver.integration.ClientAndServer getServer()
    • getConnectionTimeout

      public Duration getConnectionTimeout()
    • getExpectedServerResponses

      public Set<MockServerResponse> getExpectedServerResponses()
    • builder

      public static MockProxyServer.Builder builder()
    • builder

      public static MockProxyServer.Builder builder(MockProxyServer data)
    • before

      protected void before() throws Throwable
      Overrides:
      before in class org.junit.rules.ExternalResource
      Throws:
      Throwable
    • after

      protected void after()
      Overrides:
      after in class org.junit.rules.ExternalResource