Class InjectedTest

  • All Implemented Interfaces:
    com.google.inject.Module

    public abstract class InjectedTest
    extends java.lang.Object
    implements com.google.inject.Module
    Abstract TestNG/JUnit4 test that automatically binds and injects itself.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) class  InjectedTest.SetUpModule  
    • Constructor Summary

      Constructors 
      Constructor Description
      InjectedTest()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configure​(com.google.inject.Binder binder)
      Custom injection bindings.
      void configure​(java.util.Properties properties)
      Custom property values.
      java.lang.String getBasedir()  
      private <T> T lookup​(com.google.inject.Key<T> key)  
      <T> T lookup​(java.lang.Class<T> type)  
      <T> T lookup​(java.lang.Class<T> type, java.lang.annotation.Annotation qualifier)  
      <T> T lookup​(java.lang.Class<T> type, java.lang.Class<? extends java.lang.annotation.Annotation> qualifier)  
      <T> T lookup​(java.lang.Class<T> type, java.lang.String name)  
      BeanScanning scanning()  
      void setUp()  
      ClassSpace space()  
      SpaceModule spaceModule()  
      void tearDown()  
      • Methods inherited from class java.lang.Object

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

      • basedir

        private java.lang.String basedir
    • Constructor Detail

      • InjectedTest

        public InjectedTest()
    • Method Detail

      • setUp

        @BeforeMethod
        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • tearDown

        @AfterMethod
        public void tearDown()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • configure

        public void configure​(com.google.inject.Binder binder)
        Custom injection bindings.
        Specified by:
        configure in interface com.google.inject.Module
        Parameters:
        binder - The Guice binder
      • configure

        public void configure​(java.util.Properties properties)
        Custom property values.
        Parameters:
        properties - The test properties
      • lookup

        public final <T> T lookup​(java.lang.Class<T> type)
      • lookup

        public final <T> T lookup​(java.lang.Class<T> type,
                                  java.lang.String name)
      • lookup

        public final <T> T lookup​(java.lang.Class<T> type,
                                  java.lang.Class<? extends java.lang.annotation.Annotation> qualifier)
      • lookup

        public final <T> T lookup​(java.lang.Class<T> type,
                                  java.lang.annotation.Annotation qualifier)
      • getBasedir

        public final java.lang.String getBasedir()
      • lookup

        private <T> T lookup​(com.google.inject.Key<T> key)