Interface DirectJunitExtension

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:
Http1DirectJunitExtension, WsDirectExtension

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

    • resolveParameter

      default Object resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext, Class<?> parameterType)
      Resolve a parameter.
      Parameters:
      parameterContext - JUnit parameter context
      extensionContext - JUnit extension context
      parameterType - type of parameter
      Returns:
      instance of the parameter
      Throws:
      org.junit.jupiter.api.extension.ParameterResolutionException - in case parameter cannot be resolved
    • setUpRouteParamHandler

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