Class InjectedTestCase

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.eclipse.sisu.launch.InjectedTestCase
All Implemented Interfaces:
com.google.inject.Module, junit.framework.Test

public abstract class InjectedTestCase extends junit.framework.TestCase implements com.google.inject.Module
Abstract JUnit3 TestCase that automatically binds and injects itself.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(com.google.inject.Binder binder)
    Custom injection bindings.
    void
    configure(Properties properties)
    Custom property values.
    final String
     
    final <T> T
    lookup(Class<T> type)
     
    final <T> T
    lookup(Class<T> type, Annotation qualifier)
     
    final <T> T
    lookup(Class<T> type, Class<? extends Annotation> qualifier)
     
    final <T> T
    lookup(Class<T> type, String name)
     
     
    protected void
     
     
     
    protected void
     

    Methods inherited from class junit.framework.TestCase

    assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • InjectedTestCase

      public InjectedTestCase()
  • Method Details

    • setUp

      protected void setUp() throws Exception
      Overrides:
      setUp in class junit.framework.TestCase
      Throws:
      Exception
    • tearDown

      protected void tearDown() throws Exception
      Overrides:
      tearDown in class junit.framework.TestCase
      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()