Add basic tests for Log4J. Still need to add the multi-classloader
scenarios. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138960 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/test/org/apache/commons/logging/jdk14/CustomConfigTestCase.java,v 1.2 2003/03/30 02:30:37 craigmcc Exp $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2003/03/30 02:30:37 $
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/test/org/apache/commons/logging/jdk14/CustomConfigTestCase.java,v 1.3 2003/03/30 05:22:50 craigmcc Exp $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/03/30 05:22:50 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
@@ -84,7 +84,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
* logger configured per the configuration properties.</p>
|
||||
*
|
||||
* @author Craig R. McClanahan
|
||||
* @version $Revision: 1.2 $ $Date: 2003/03/30 02:30:37 $
|
||||
* @version $Revision: 1.3 $ $Date: 2003/03/30 05:22:50 $
|
||||
*/
|
||||
|
||||
public class CustomConfigTestCase extends DefaultConfigTestCase {
|
||||
@@ -142,14 +142,14 @@ public class CustomConfigTestCase extends DefaultConfigTestCase {
|
||||
* <p>The message levels that should have been logged.</p>
|
||||
*/
|
||||
protected Level testLevels[] =
|
||||
{ Level.FINE, Level.INFO, Level.WARNING, Level.SEVERE };
|
||||
{ Level.FINE, Level.INFO, Level.WARNING, Level.SEVERE, Level.SEVERE };
|
||||
|
||||
|
||||
/**
|
||||
* <p>The message strings that should have been logged.</p>
|
||||
*/
|
||||
protected String testMessages[] =
|
||||
{ "debug", "info", "warn", "error" };
|
||||
{ "debug", "info", "warn", "error", "fatal" };
|
||||
|
||||
|
||||
// ------------------------------------------- JUnit Infrastructure Methods
|
||||
@@ -224,6 +224,7 @@ public class CustomConfigTestCase extends DefaultConfigTestCase {
|
||||
super.testPristineLog();
|
||||
|
||||
// Assert which logging levels have been enabled
|
||||
assertTrue(log.isFatalEnabled());
|
||||
assertTrue(log.isErrorEnabled());
|
||||
assertTrue(log.isWarnEnabled());
|
||||
assertTrue(log.isInfoEnabled());
|
||||
@@ -298,6 +299,7 @@ public class CustomConfigTestCase extends DefaultConfigTestCase {
|
||||
log.info("info", t);
|
||||
log.warn("warn", t);
|
||||
log.error("error", t);
|
||||
log.fatal("fatal", t);
|
||||
}
|
||||
|
||||
|
||||
@@ -308,6 +310,7 @@ public class CustomConfigTestCase extends DefaultConfigTestCase {
|
||||
log.info("info");
|
||||
log.warn("warn");
|
||||
log.error("error");
|
||||
log.fatal("fatal");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user