| org.springunit.framework.SpringUnitTest
All known Subclasses: org.springunit.framework.samples.jpetstore.domain.logic.hibernate.PetStoreImplTransactionTest, org.springunit.examples.CompositeDateTimeSpringUnitTest, org.springunit.framework.samples.jpetstore.domain.OrderTest, org.springunit.framework.samples.jpetstore.domain.LineItemTest, org.springunit.examples.tutorial.CompositeDateTutorialExample1Test, org.springunit.framework.samples.jpetstore.domain.logic.PetStoreImplTest, org.springunit.examples.constructor.springunit.v1.CompositeDateConstructorTest, org.springunit.examples.tutorial.RangeTutorialExample6TestAbstract, org.springunit.examples.tutorial.CompositeDateTutorialExample3Test, org.springunit.examples.tutorial.CompositeDateTutorialExample2Test, org.springunit.framework.samples.jpetstore.domain.CartTest, org.springunit.examples.errors.IncorrectTypeOfValueInXmlTest, org.springunit.examples.errors.IncorrectPropertyNameInJavaTest, org.springunit.examples.RangeSpringUnitTestAbstract, org.springunit.examples.errors.NoXmlFileTest, org.springunit.examples.errors.IncorrectPropertyNameInXmlTest, org.springunit.examples.CompositeTimeSpringUnitTest, org.springunit.examples.errors.IncorrectNameOfTestInXmlTest, org.springunit.framework.samples.jpetstore.domain.CartItemTest, org.springunit.examples.errors.IncorrectXmlFilenameTest, org.springunit.examples.errors.IncorrectNameOfValueInXmlTest, org.springunit.examples.CompositeDateSpringUnitTest, org.springunit.framework.tests.OneDeepUnitTest, org.springunit.framework.samples.jpetstore.domain.AccountTest, org.springunit.examples.tutorial.RangeTutorialExample4Test, org.springunit.framework.samples.jpetstore.domain.CategoryTest, org.springunit.framework.samples.jpetstore.domain.ItemTest, org.springunit.examples.tutorial.RangeTutorialExample5Test, org.springunit.framework.samples.jpetstore.domain.ProductTest, org.springunit.framework.samples.jpetstore.domain.logic.AdministrationServiceImplTest, org.springunit.framework.junit4.SpringUnit4Test,
SpringUnitTest | abstract public class SpringUnitTest extends AbstractDependencyInjectionSpringContextTests (Code) | | Extends Spring's test framework to support data-driven tests.
Data-driven tests separate data values from test logic,
keeping data values in external files and test logic in Java code.
Every descendent of SpringUnitTest is required by convention
to have a bean called Classname of type
SpringUnitContext, where Classname is
the simple name of the subclass of SpringUnitTest.
Note that the simple names of subclasses must be unique,
that is, they must not be distinguished solely by different
package qualifiers.
author: Ted Velkoff |
Method Summary | |
final protected String[] | getConfigLocations() Return list of file names that the
Spring test framework uses in order to create beans for testing. | final protected T | getObject(String key) Search for object identified by key
in the hierarchy of contexts. |
SpringUnitTest | protected SpringUnitTest()(Code) | | Default constructor.
|
SpringUnitTest | protected SpringUnitTest(String fName)(Code) | | Constructor with JUnit name.
Sets AutowireMode to "by name" (overriding the default, which is "by type").
Creates a context contexts that stores the
hierarchy of test contexts.
Parameters: fName - Name of JUnit test |
getConfigLocations | final protected String[] getConfigLocations()(Code) | | Return list of file names that the
Spring test framework uses in order to create beans for testing.
Array of string filenames |
getObject | final protected T getObject(String key) throws Exception(Code) | | Search for object identified by key
in the hierarchy of contexts.
Parameters: key - Identifier of data value to find Object if found or null throws: Exception - if errors occur when using reflectionto access the SpringUnitContext for anyclass in the list |
|
|