Class ClusterInstanceParameterResolver

java.lang.Object
org.apache.kafka.common.test.junit.ClusterInstanceParameterResolver
All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.ParameterResolver

public class ClusterInstanceParameterResolver extends Object implements org.junit.jupiter.api.extension.ParameterResolver
This resolver provides an instance of ClusterInstance to a test invocation. The instance represents the underlying cluster being run for the current test. It can be injected into test methods or into the class constructor. N.B., if injected into the class constructor, the instance will not be fully initialized until the actual test method is being invoked. This is because the cluster is not started until after class construction and after "before" lifecycle methods have been run. Constructor injection is meant for convenience so helper methods can be defined on the test which can rely on a class member rather than an argument for ClusterInstance.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    boolean
    supportsParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • supportsParameter

      public boolean supportsParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
      Specified by:
      supportsParameter in interface org.junit.jupiter.api.extension.ParameterResolver
    • resolveParameter

      public Object resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
      Specified by:
      resolveParameter in interface org.junit.jupiter.api.extension.ParameterResolver