|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.fulcrum.testcontainer.BaseUnitTest
public class BaseUnitTest
Base class for unit tests for components. This version doesn't load the container until the first request for a component. This allows the tester to populate the configurationFileName and roleFileName, possible one per test.
| Field Summary | |
|---|---|
static String |
COMPONENT_APP_ROOT
Key used in the context for defining the application root |
static String |
CONTAINER_ECM
|
static String |
CONTAINER_YAAFI
|
static String |
containerType
Pick the default container to be Yaafi |
| Constructor Summary | |
|---|---|
BaseUnitTest(String testName)
Constructor for test. |
|
| Method Summary | |
|---|---|
protected String |
getConfigurationFileName()
Gets the configuration file name for the container should use for this test. |
protected String |
getParameterFileName()
Gets the parameter file name for the container should use for this test. |
protected String |
getRoleFileName()
Gets the role file name for the container should use for this test. |
protected Object |
lookup(String roleName)
Returns an instance of the named component. |
protected void |
release(Object component)
Releases the component |
protected Object |
resolve(String roleName)
Helper method for converting to and from Merlin Unit TestCase. |
protected void |
setConfigurationFileName(String configurationFileName)
Gets the configuration file name for the container should use for this test. |
protected void |
setRoleFileName(String roleFileName)
Override the role file name for the container should use for this test. |
protected void |
tearDown()
Clean up after each test is run. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String CONTAINER_ECM
public static final String CONTAINER_YAAFI
public static String COMPONENT_APP_ROOT
public static String containerType
| Constructor Detail |
|---|
public BaseUnitTest(String testName)
testName - name of the test being executed| Method Detail |
|---|
protected void setConfigurationFileName(String configurationFileName)
configurationFileName - protected void setRoleFileName(String roleFileName)
roleFileName - protected void tearDown()
tearDown in class junit.framework.TestCaseprotected String getConfigurationFileName()
protected String getRoleFileName()
protected String getParameterFileName()
protected Object lookup(String roleName)
throws org.apache.avalon.framework.component.ComponentException
roleName - Name of the role the component fills.
org.apache.avalon.framework.component.ComponentException - generic exception
protected Object resolve(String roleName)
throws org.apache.avalon.framework.component.ComponentException
roleName -
org.apache.avalon.framework.component.ComponentExceptionprotected void release(Object component)
component -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||