| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.test.BaseRiceTestCase
org.kuali.rice.test.RiceTestCase
public abstract class RiceTestCase
Useful superclass for all Rice test cases. Handles setup of test utilities and a test environment. Configures the Spring test environment providing a template method for custom context files in test mode. Also provides a template method for running custom transactional setUp. Tear down handles automatic tear down of objects created inside the test environment.
| Field Summary | |
|---|---|
| protected static String | DEFAULT_TEST_HARNESS_SPRING_BEANS | 
| protected static String | failedSuiteTestName | 
| protected  List<Lifecycle> | perTestLifeCycles | 
| protected static boolean | SUITE_LIFE_CYCLES_FAILED | 
| protected static boolean | SUITE_LIFE_CYCLES_RAN | 
| protected  List<Lifecycle> | suiteLifeCycles | 
| Fields inherited from class org.kuali.rice.test.BaseRiceTestCase | 
|---|
| log, method | 
| Constructor Summary | |
|---|---|
| RiceTestCase() | |
| Method Summary | |
|---|---|
| protected  void | configureLogging() | 
| protected  String | dumpMemory() | 
| protected  String | getBaseDir()Returns the basedir for the module under which the tests are currently executing. | 
| protected  List<String> | getConfigLocations()Subclasses may override this method to customize the location(s) of the Rice configuration. | 
| protected  String | getFullTestName() | 
| protected  Lifecycle | getLoadApplicationLifecycle()This should return a Lifecycle that can be used to load the application being tested. | 
| protected abstract  String | getModuleName()same as the module directory in the project. | 
| protected  String | getModuleTestConfigLocation() | 
| protected  List<Lifecycle> | getPerTestLifecycles() | 
| protected  String | getRiceMasterDefaultConfigFile() | 
| protected  List<Lifecycle> | getSuiteLifecycles()Returns the List of Lifecycles to start when the unit test suite is started | 
| protected  Config | getTestHarnessConfig() | 
| protected  List<String> | getTestHarnessSpringBeansLocation()Returns the location of the test harness spring beans context file. | 
|  SpringResourceLoader | getTestHarnessSpringResourceLoader() | 
| protected  String | getUserDir() | 
| protected  void | loadPerTestData()A method that can be overridden to load test data on a test-by-test basis | 
| protected  void | loadSuiteTestData()A method that can be overridden to load test data for the unit test Suite. | 
| protected  void | logAfterRun() | 
| protected  void | logBeforeRun() | 
| protected  void | report(String report) | 
| protected  void | setBaseDirSystemProperty(String moduleBaseDir)maven will set this property and find resources from the config based on it. | 
| protected  void | setClearTables(boolean clearTables) | 
| protected  void | setModuleName(String moduleName) | 
|  void | setUp() | 
| protected  void | setUpInternal()Internal setUp() implementation which is invoked by the main setUp() and wrapped with exception handling. | 
| protected  void | startLifecycles(List<Lifecycle> lifecycles)Executes the start() method of each of the lifecycles in the given list. | 
| protected  void | startSuiteDataLoaderLifecycles()This block is walking up the class hierarchy of the current unit test looking for PerSuiteUnitTestData annotations. | 
| protected  void | stopLifecycles(List<Lifecycle> lifecycles)Executes the stop() method of each of the lifecyles in the given list. | 
|  void | tearDown() | 
| Methods inherited from class org.kuali.rice.test.BaseRiceTestCase | 
|---|
| getName, getPerTestDataLoaderLifecycle, resetLogLevels, setLogLevel, setName, setTestMethod | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected static final String DEFAULT_TEST_HARNESS_SPRING_BEANS
protected static boolean SUITE_LIFE_CYCLES_RAN
protected static boolean SUITE_LIFE_CYCLES_FAILED
protected static String failedSuiteTestName
protected List<Lifecycle> perTestLifeCycles
protected List<Lifecycle> suiteLifeCycles
| Constructor Detail | 
|---|
public RiceTestCase()
| Method Detail | 
|---|
public void setUp()
           throws Exception
setUp in class BaseRiceTestCaseException
protected void setUpInternal()
                      throws Exception
Exception
protected void startSuiteDataLoaderLifecycles()
                                       throws Exception
Exception - if a PerSuiteDataLoaderLifecycle is unable to be startedprotected void setBaseDirSystemProperty(String moduleBaseDir)
protected String getUserDir()
protected String getBaseDir()
protected void setModuleName(String moduleName)
public void tearDown()
              throws Exception
tearDown in class BaseRiceTestCaseExceptionprotected void logBeforeRun()
protected void logAfterRun()
protected String getFullTestName()
protected void configureLogging()
                         throws IOException
IOException
protected void startLifecycles(List<Lifecycle> lifecycles)
                        throws Exception
Exception
protected void stopLifecycles(List<Lifecycle> lifecycles)
                       throws Exception
Exceptionprotected List<Lifecycle> getSuiteLifecycles()
protected Lifecycle getLoadApplicationLifecycle()
protected List<Lifecycle> getPerTestLifecycles()
protected void loadSuiteTestData()
                          throws Exception
Exception
protected void loadPerTestData()
                        throws Exception
Exceptionprotected void report(String report)
protected String dumpMemory()
public SpringResourceLoader getTestHarnessSpringResourceLoader()
protected List<String> getTestHarnessSpringBeansLocation()
protected Config getTestHarnessConfig()
                               throws Exception
Exceptionprotected List<String> getConfigLocations()
protected String getModuleTestConfigLocation()
protected String getRiceMasterDefaultConfigFile()
protected abstract String getModuleName()
protected void setClearTables(boolean clearTables)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||