Class AbstractMockServerTest

java.lang.Object
com.influxdb.test.AbstractTest
com.influxdb.test.AbstractMockServerTest

public abstract class AbstractMockServerTest extends AbstractTest
Author:
Jakub Bednar (bednar@github) (05/10/2018 08:36)
  • Field Details

    • mockServer

      protected okhttp3.mockwebserver.MockWebServer mockServer
    • mockServerExtension

      protected MockServerExtension mockServerExtension
  • Constructor Details

    • AbstractMockServerTest

      public AbstractMockServerTest()
  • Method Details

    • startMockServer

      @Nonnull protected String startMockServer()
      Start Mock server.
      Returns:
      the mock server URL
    • after

      @AfterEach protected void after() throws IOException
      Throws:
      IOException
    • createResponse

      @Nonnull protected okhttp3.mockwebserver.MockResponse createResponse(String data)
    • createResponse

      @Nonnull protected okhttp3.mockwebserver.MockResponse createResponse(String data, String contentType, boolean chunked)
    • createResponse

      @Nonnull protected okhttp3.mockwebserver.MockResponse createResponse(String data, String contentType, boolean chunked, long bodyDelay)
    • createErrorResponse

      @Nonnull protected okhttp3.mockwebserver.MockResponse createErrorResponse(@Nullable String influxError)
    • createErrorResponse

      @Nonnull protected okhttp3.mockwebserver.MockResponse createErrorResponse(@Nullable String influxError, boolean chunked)
    • createErrorResponse

      @Nonnull protected okhttp3.mockwebserver.MockResponse createErrorResponse(@Nullable String influxError, boolean chunked, int responseCode)
    • createErrorResponse

      @Nonnull protected okhttp3.mockwebserver.MockResponse createErrorResponse(@Nullable String influxError, boolean chunked, int responseCode, int bodyDelay)
    • enqueuedResponse

      protected void enqueuedResponse()
    • takeRequest

      protected okhttp3.mockwebserver.RecordedRequest takeRequest() throws InterruptedException
      Throws:
      InterruptedException
    • getRequestBody

      @Nonnull protected String getRequestBody(@Nonnull okhttp3.mockwebserver.MockWebServer server)