|
||||||||||
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.log4j.StandardTests
public abstract class StandardTests
Abstract set of tests that can be executed with various classpaths set.
The tests verify that when running on a system with Log4J present, Log4J is selected and that the logger basically works.
Nested Class Summary | |
---|---|
static class |
StandardTests.LogEvent
Simple structure to store information about messages that actually get logged by the underlying logging library. |
Constructor Summary | |
---|---|
StandardTests()
|
Method Summary | |
---|---|
void |
setUp()
Set up instance variables required by this test case. |
abstract void |
setUpTestAppender(List logEvents)
Modify log4j's setup so that all messages actually logged get redirected into the specified list. |
void |
tearDown()
Tear down instance variables required by this test case. |
void |
testCreateFactory()
Test that a LogFactory gets created as expected. |
void |
testExceptionMessages()
Verify that we can log exception messages. |
void |
testPlainMessages()
Verify that we can log messages without exceptions. |
void |
testSerializable()
Test Serializability of Log instance |
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 |
Constructor Detail |
---|
public StandardTests()
Method Detail |
---|
public void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
public void tearDown()
tearDown
in class junit.framework.TestCase
public abstract void setUpTestAppender(List logEvents) throws Exception
This method also sets the logging level to INFO so that we can test whether messages are getting properly filtered.
Exception
public void testCreateFactory()
public void testPlainMessages() throws Exception
Exception
public void testExceptionMessages() throws Exception
Exception
public void testSerializable() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |