Class TestScenario.Builder

java.lang.Object
io.micronaut.http.tck.TestScenario.Builder
Enclosing class:
TestScenario

public static class TestScenario.Builder extends Object
Test Scenario Builder.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • specName

      public TestScenario.Builder specName(String specName)
      Parameters:
      specName - Value for spec.name property. Used to avoid bean pollution.
      Returns:
      Test Scenario builder
    • request

      public TestScenario.Builder request(HttpRequest<?> request)
      Parameters:
      request - HTTP Request to be sent in the test scenario
      Returns:
      The Test Scneario Builder
    • request

      public TestScenario.Builder request(RequestSupplier request)
      Parameters:
      request - HTTP Request supplier that given a server, provides the request to be sent in the test scenario
      Returns:
      The Test Scenario Builder
    • configuration

      public TestScenario.Builder configuration(Map<String,Object> configuration)
      Parameters:
      configuration - Test Scenario configuration
      Returns:
      Test scenario builder
    • assertion

      public TestScenario.Builder assertion(BiConsumer<ServerUnderTest,HttpRequest<?>> assertion)
      Parameters:
      assertion - Assertion for a request and server.
      Returns:
      The Test Scenario Builder
    • run

      public void run() throws IOException
      Runs the Test Scneario.
      Throws:
      IOException - Exception thrown while getting the server under test.