|
||||||||||
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.commons.logging.simple.DefaultConfigTestCase
public class DefaultConfigTestCase
TestCase for simple logging when running with zero configuration other than selecting the SimpleLog implementation.
Field Summary | |
---|---|
protected org.apache.commons.logging.LogFactory |
factory
The LogFactory implementation we have selected. |
protected org.apache.commons.logging.Log |
log
The Log implementation we have selected. |
Constructor Summary | |
---|---|
DefaultConfigTestCase()
|
Method Summary | |
---|---|
protected void |
checkDecorated()
|
protected void |
checkStandard()
|
void |
setProperties()
Set system properties that will control the LogFactory/Log objects when they are created. |
void |
setUp()
Set up instance variables required by this test case. |
protected void |
setUpDecorated(String name)
|
protected void |
setUpFactory()
|
protected void |
setUpLog(String name)
|
static junit.framework.Test |
suite()
Return the tests included in this test suite. |
void |
tearDown()
Tear down instance variables required by this test case. |
void |
testPristineDecorated()
|
void |
testPristineFactory()
|
void |
testPristineLog()
|
void |
testSerializable()
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected org.apache.commons.logging.LogFactory factory
The LogFactory
implementation we have selected.
protected org.apache.commons.logging.Log log
The Log
implementation we have selected.
Constructor Detail |
---|
public DefaultConfigTestCase()
Method Detail |
---|
public static junit.framework.Test suite() throws Exception
We need to use a PathableClassLoader here because the SimpleLog class is a pile of junk and chock-full of static variables. Any other test (like simple.CustomConfigTestCase) that has used the SimpleLog class will already have caused it to do once-only initialisation that we can't reset, even by calling LogFactory.releaseAll, because of those ugly statics. The only clean solution is to load a clean copy of commons-logging including SimpleLog via a nice clean classloader. Or we could fix SimpleLog to be sane...
Exception
public void setProperties()
public void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
public void tearDown()
tearDown
in class junit.framework.TestCase
public void testPristineDecorated()
public void testPristineLog()
public void testPristineFactory()
public void testSerializable() throws Exception
Exception
protected void checkDecorated()
protected void checkStandard()
protected void setUpDecorated(String name)
protected void setUpFactory() throws Exception
Exception
protected void setUpLog(String name) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |