org.sonatype.guice.bean.containers
Class InjectedTest

java.lang.Object
  extended by org.sonatype.guice.bean.containers.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 Summary
InjectedTest()
           
 
Method Summary
 void configure(com.google.inject.Binder binder)
          Custom injection bindings.
 void configure(Properties properties)
          Custom property values.
 String getBasedir()
           
<T> T
lookup(Class<T> type)
           
<T> T
lookup(Class<T> type, Annotation qualifier)
           
<T> T
lookup(Class<T> type, Class<? extends Annotation> qualifier)
           
<T> T
lookup(Class<T> type, String name)
           
 BeanScanning scanning()
           
 void setUp()
           
 ClassSpace space()
           
 void tearDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectedTest

public InjectedTest()
Method Detail

setUp

public void setUp()

tearDown

public void tearDown()

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()


Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.