org.apache.commons.logging.log4j.log4j12
Class Log4j12StandardTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.logging.log4j.StandardTests
              extended by org.apache.commons.logging.log4j.log4j12.Log4j12StandardTests
All Implemented Interfaces:
junit.framework.Test

public class Log4j12StandardTests
extends StandardTests

A concrete class that runs the standard tests, and is compiled specifically against log4j12. The parent class can't call any log4j methods at all as that would mean it has to be compiled against a particular version of log4j.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.logging.log4j.StandardTests
StandardTests.LogEvent
 
Constructor Summary
Log4j12StandardTests()
           
 
Method Summary
 void setUpTestAppender(List logEvents)
          Modify log4j's setup so that all messages actually logged get redirected into the specified list.
 
Methods inherited from class org.apache.commons.logging.log4j.StandardTests
setUp, tearDown, testCreateFactory, testExceptionMessages, testPlainMessages, 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
 

Constructor Detail

Log4j12StandardTests

public Log4j12StandardTests()
Method Detail

setUpTestAppender

public void setUpTestAppender(List logEvents)
Description copied from class: StandardTests
Modify log4j's setup so that all messages actually logged get redirected into the specified list.

This method also sets the logging level to INFO so that we can test whether messages are getting properly filtered.

Specified by:
setUpTestAppender in class StandardTests


Copyright © 2001-2011 Apache Software Foundation. All Rights Reserved.