Class InjectionContext


  • public final class InjectionContext
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.junit.jupiter.api.extension.ExtensionContext.Namespace NAMESPACE  
    • Constructor Summary

      Constructors 
      Constructor Description
      InjectionContext​(org.junit.jupiter.api.extension.ExtensionContext context)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void defineBean​(java.lang.Class<?> testClass, java.lang.String beanName, java.lang.Class<?> beanType, java.lang.Object instance)  
      <T,​B>
      java.util.Optional<B>
      findBean​(java.lang.Class<T> testClass, java.lang.String beanName, java.lang.Class<B> beanType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NAMESPACE

        public static final org.junit.jupiter.api.extension.ExtensionContext.Namespace NAMESPACE
    • Constructor Detail

      • InjectionContext

        public InjectionContext​(org.junit.jupiter.api.extension.ExtensionContext context)
    • Method Detail

      • defineBean

        public void defineBean​(java.lang.Class<?> testClass,
                               java.lang.String beanName,
                               java.lang.Class<?> beanType,
                               java.lang.Object instance)
      • findBean

        public <T,​B> java.util.Optional<B> findBean​(java.lang.Class<T> testClass,
                                                          java.lang.String beanName,
                                                          java.lang.Class<B> beanType)