|
||||||||||
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.jdk14.DefaultConfigTestCase
org.apache.commons.logging.jdk14.CustomConfigTestCase
public class CustomConfigTestCase
TestCase for JDK 1.4 logging when running on a JDK 1.4 system with custom configuration, so that JDK 1.4 should be selected and an appropriate logger configured per the configuration properties.
Field Summary | |
---|---|
protected TestHandler |
handler
The customized Handler we will be using. |
protected static String |
HANDLER_NAME
|
protected Handler[] |
handlers
The underlying Handler s we will be using. |
protected Logger |
logger
The underlying Logger we will be using. |
protected LogManager |
manager
The underlying LogManager we will be using. |
protected Level[] |
testLevels
The message levels that should have been logged. |
protected String[] |
testMessages
The message strings that should have been logged. |
Fields inherited from class org.apache.commons.logging.jdk14.DefaultConfigTestCase |
---|
factory, log |
Constructor Summary | |
---|---|
CustomConfigTestCase(String name)
Construct a new instance of this test case. |
Method Summary | |
---|---|
protected void |
checkLog()
|
protected void |
checkLogRecords(boolean thrown)
|
protected static void |
loadTestHandler(String className,
ClassLoader targetCL)
Make a class available in the system classloader even when its classfile is not present in the classpath configured for that classloader. |
protected void |
logExceptionMessages()
|
protected void |
logPlainMessages()
|
protected static byte[] |
readClass(String name,
ClassLoader srcCL)
Given the name of a class that is somewhere in the classpath of the provided classloader, return the contents of the corresponding .class file. |
void |
setUp()
Set up instance variables required by this test case. |
protected void |
setUpHandlers()
|
protected void |
setUpLogger(String name)
|
protected void |
setUpManager(String config)
|
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 |
testExceptionMessages()
|
void |
testPlainMessages()
|
void |
testPristineHandlers()
|
void |
testPristineLogger()
|
void |
testSerializable()
|
Methods inherited from class org.apache.commons.logging.jdk14.DefaultConfigTestCase |
---|
setUpFactory, setUpLog, testPristineFactory, testPristineLog |
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 static final String HANDLER_NAME
protected TestHandler handler
The customized Handler
we will be using.
protected Handler[] handlers
The underlying Handler
s we will be using.
protected Logger logger
The underlying Logger
we will be using.
protected LogManager manager
The underlying LogManager
we will be using.
protected Level[] testLevels
The message levels that should have been logged.
protected String[] testMessages
The message strings that should have been logged.
Constructor Detail |
---|
public CustomConfigTestCase(String name)
Construct a new instance of this test case.
name
- Name of the test caseMethod Detail |
---|
protected static byte[] readClass(String name, ClassLoader srcCL) throws Exception
Exception
protected static void loadTestHandler(String className, ClassLoader targetCL)
public void setUp() throws Exception
setUp
in class DefaultConfigTestCase
Exception
public static junit.framework.Test suite() throws Exception
Exception
public void tearDown()
tearDown
in class DefaultConfigTestCase
public void testExceptionMessages() throws Exception
Exception
public void testPlainMessages() throws Exception
Exception
public void testPristineHandlers()
public void testPristineLogger()
public void testSerializable() throws Exception
testSerializable
in class DefaultConfigTestCase
Exception
protected void checkLog()
checkLog
in class DefaultConfigTestCase
protected void checkLogRecords(boolean thrown)
protected void logExceptionMessages()
protected void logPlainMessages()
protected void setUpHandlers() throws Exception
Exception
protected void setUpLogger(String name) throws Exception
Exception
protected void setUpManager(String config) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |