org.kuali.rice.test
Class BaseRiceTestCase

java.lang.Object
  extended by org.kuali.rice.test.BaseRiceTestCase
All Implemented Interfaces:
MethodAware
Direct Known Subclasses:
RiceTestCase

public abstract class BaseRiceTestCase
extends Object
implements MethodAware

A generic Rice Unit Test base class. 1) Sets up a generic logger. 2) Sets the name of the class being run to mimic jUnit 3 functionality. 3) Stores the name of the method being run for use by subclasses (set by RiceUnitTestClassRunner 4) Sets the PerTestDataLoaderLifecycle that will load sql for the currently running test.

Since:
0.9
Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
protected  org.apache.log4j.Logger log
           
protected  Method method
           
 
Constructor Summary
BaseRiceTestCase()
           
 
Method Summary
 String getName()
           
protected  PerTestDataLoaderLifecycle getPerTestDataLoaderLifecycle()
           
protected  void resetLogLevels()
          Restores the logging-levels changed through calls to setLogLevel to their original values.
protected  void setLogLevel(String loggerName, org.apache.log4j.Level newLevel)
          Changes the logging-level associated with the given loggerName to the given level.
 void setName(String name)
           
 void setTestMethod(Method testMethod)
           
 void setUp()
           
 void tearDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.log4j.Logger log

method

protected Method method
Constructor Detail

BaseRiceTestCase

public BaseRiceTestCase()
Method Detail

getName

public String getName()

setName

public void setName(String name)

setUp

public void setUp()
           throws Exception
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Throws:
Exception

setLogLevel

protected void setLogLevel(String loggerName,
                           org.apache.log4j.Level newLevel)
Changes the logging-level associated with the given loggerName to the given level. The original logging-level is saved, and will be automatically restored at the end of each test.

Parameters:
loggerName - name of the logger whose level to change
newLevel - the level to change to

resetLogLevels

protected void resetLogLevels()
Restores the logging-levels changed through calls to setLogLevel to their original values.


setTestMethod

public void setTestMethod(Method testMethod)
Specified by:
setTestMethod in interface MethodAware
See Also:
MethodAware.setTestMethod(java.lang.reflect.Method)

getPerTestDataLoaderLifecycle

protected PerTestDataLoaderLifecycle getPerTestDataLoaderLifecycle()


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.