Interface ServerJunitExtension

All Superinterfaces:
org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension, HelidonJunitExtension
All Known Implementing Classes:
Http1ServerJunitExtension, Http2ServerExtension, WsServerExtension

public interface ServerJunitExtension extends HelidonJunitExtension
Java ServiceLoader provider interface for extending server tests with support for additional injection, such as HTTP/1.1 client.
  • Method Details

    • updateServerBuilder

      default void updateServerBuilder(WebServerConfig.Builder builder)
      Update WebServer builder.
      builder - builder to update, will be used to build server instance
    • updateListenerBuilder

      default void updateListenerBuilder(String socketName, ListenerConfig.Builder listenerBuilder, Router.RouterBuilder<?> routerBuilder)
      Called for sockets defined by SetUpRoute.
      socketName - name of the socket
      listenerBuilder - listener configuration builder
      routerBuilder - router builder
    • resolveParameter

      default Object resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext, Class<?> parameterType, WebServer server)
      parameterContext - JUnit parameter context
      extensionContext - JUnit extension context
      parameterType - type of parameter
      server - webserver instance
      instance of the expected type
    • setUpRouteParamHandler

      default Optional<ServerJunitExtension.ParamHandler<?>> setUpRouteParamHandler(Class<?> type)
      Check if the type is supported and return a handler for it.
      type - type of the parameter to SetUpRoute method
      parameter handler if the type is supported, empty otherwise