public class BaseUnitTest
extends junit.framework.TestCase
BaseUnit4Test
Modifier and Type | Field and Description |
---|---|
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
|
static int |
defaultLogLevel
Use INFO for ConsoleLogger
|
Constructor and Description |
---|
BaseUnitTest(String testName)
Constructor for test.
|
Modifier and Type | Method and Description |
---|---|
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 |
setLogLevel(int logLevel)
Set the console logger level,
|
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.
|
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, toString
public static final String CONTAINER_ECM
public static final String CONTAINER_YAAFI
public static String COMPONENT_APP_ROOT
public static String containerType
public static int defaultLogLevel
public BaseUnitTest(String testName)
testName
- name of the test being executedprotected void setConfigurationFileName(String configurationFileName)
configurationFileName
- protected void setRoleFileName(String roleFileName)
roleFileName
- protected void setLogLevel(int logLevel)
protected void tearDown()
tearDown
in class junit.framework.TestCase
protected 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 exceptionprotected Object resolve(String roleName) throws org.apache.avalon.framework.component.ComponentException
roleName
- org.apache.avalon.framework.component.ComponentException
protected void release(Object component)
component
- Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.