Class InjectedTest

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

    public abstract class InjectedTest
    extends Object
    implements com.google.inject.Module
    Abstract TestNG/JUnit4 test that automatically binds and injects itself.
    • Constructor Detail

      • InjectedTest

        public InjectedTest()
    • Method Detail

      • 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​(Properties properties)
        Custom property values.
        Parameters:
        properties - The test properties
      • lookup

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

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

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

        public final String getBasedir()