Class EmbeddedServerUnderTest

java.lang.Object
io.micronaut.http.tck.EmbeddedServerUnderTest
All Implemented Interfaces:
io.micronaut.context.ApplicationContextProvider, ServerUnderTest, Closeable, AutoCloseable

public class EmbeddedServerUnderTest extends Object implements ServerUnderTest
ServerUnderTest implementation for EmbeddedServer.
Since:
3.0.0
  • Constructor Details

    • EmbeddedServerUnderTest

      public EmbeddedServerUnderTest(@NonNull @NonNull Map<String,Object> properties)
  • Method Details

    • exchange

      public <I, O> io.micronaut.http.HttpResponse<O> exchange(io.micronaut.http.HttpRequest<I> request, io.micronaut.core.type.Argument<O> bodyType)
      Specified by:
      exchange in interface ServerUnderTest
    • exchange

      public <I, O, E> io.micronaut.http.HttpResponse<O> exchange(io.micronaut.http.HttpRequest<I> request, io.micronaut.core.type.Argument<O> bodyType, io.micronaut.core.type.Argument<E> errorType)
      Specified by:
      exchange in interface ServerUnderTest
    • getApplicationContext

      public io.micronaut.context.ApplicationContext getApplicationContext()
      Specified by:
      getApplicationContext in interface io.micronaut.context.ApplicationContextProvider
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • getScheme

      public Optional<String> getScheme()
      Specified by:
      getScheme in interface ServerUnderTest
    • getPort

      @NonNull public @NonNull Optional<Integer> getPort()
      Specified by:
      getPort in interface ServerUnderTest
    • getURL

      @NonNull public @NonNull Optional<URL> getURL()
      Specified by:
      getURL in interface ServerUnderTest