Class InjectedTest

java.lang.Object
org.eclipse.sisu.launch.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.
  • Field Details

  • Constructor Details

    • InjectedTest

      public InjectedTest()
  • Method Details

    • setUp

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

      @AfterMethod public void tearDown() throws Exception
      Throws:
      Exception
    • spaceModule

      public SpaceModule spaceModule()
    • space

      public ClassSpace space()
    • scanning

      public BeanScanning scanning()
    • 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, Class<? extends Annotation> qualifier)
    • lookup

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

      public final String getBasedir()
    • lookup

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