com.googlecode.refit.spring
Class SpringTestContextFixtureLoader

java.lang.Object
  extended by fit.FixtureLoader
      extended by com.googlecode.refit.spring.SpringTestContextFixtureLoader

public class SpringTestContextFixtureLoader
extends FixtureLoader

A fixture loader which performs Spring dependency injection on all fixtures annotated with ContextConfiguration, using a Spring Test Context. For classes without a ContextConfiguration annotation, this loader defaults to the standard FixtureLoader behaviour.

Author:
Harald Wellmann

Constructor Summary
SpringTestContextFixtureLoader()
           
 
Method Summary
 Fixture createFixture(Class<?> klass)
          Creates an instance of a fixture class and performs Spring dependency injection if class is annotated with ContextConfiguration.
 
Methods inherited from class fit.FixtureLoader
getInstance, loadFixture, loadFixtureClass, setInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringTestContextFixtureLoader

public SpringTestContextFixtureLoader()
Method Detail

createFixture

public Fixture createFixture(Class<?> klass)
                      throws InstantiationException,
                             IllegalAccessException
Creates an instance of a fixture class and performs Spring dependency injection if class is annotated with ContextConfiguration.

Overrides:
createFixture in class FixtureLoader
Parameters:
fixtureClassName - name of fixture class
Throws:
InstantiationException
IllegalAccessException


Copyright © 2011. All Rights Reserved.