Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 30059 invoked from network); 19 Oct 2002 17:14:34 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Oct 2002 17:14:34 -0000 Received: (qmail 4243 invoked by uid 97); 19 Oct 2002 17:15:23 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 4203 invoked by uid 97); 19 Oct 2002 17:15:22 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 4192 invoked by uid 97); 19 Oct 2002 17:15:21 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: 19 Oct 2002 17:14:26 -0000 Message-ID: <20021019171426.22053.qmail@icarus.apache.org> From: rsitze@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/logging/src/test/org/apache/commons/logging LogTest.java AbstractLogTest.java TestAll.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N rsitze 2002/10/19 10:14:26 Modified: logging/src/test/org/apache/commons/logging AbstractLogTest.java TestAll.java Added: logging/src/test/org/apache/commons/logging LogTest.java Log: - Added new LogTest that exercises factory - log statements now show implementation class (helpfull for visual verification that expected logger was found). Revision Changes Path 1.5 +18 -13 jakarta-commons/logging/src/test/org/apache/commons/logging/AbstractLogTest.java Index: AbstractLogTest.java =================================================================== RCS file: /home/cvs/jakarta-commons/logging/src/test/org/apache/commons/logging/AbstractLogTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- AbstractLogTest.java 18 Oct 2002 04:19:56 -0000 1.4 +++ AbstractLogTest.java 19 Oct 2002 17:14:26 -0000 1.5 @@ -86,53 +86,58 @@ assertNotNull(log); + log.debug(null); log.debug(null, null); - log.debug("debug statement"); + log.debug(log.getClass().getName() + ": debug statement"); - log.debug("debug statement w/ null exception", new RuntimeException()); + log.debug(log.getClass().getName() + ": debug statement w/ null exception", new RuntimeException()); + log.error(null); log.error(null, null); - log.error("error statement"); + log.error(log.getClass().getName() + ": error statement"); - log.error("error statement w/ null exception", new RuntimeException()); + log.error(log.getClass().getName() + ": error statement w/ null exception", new RuntimeException()); + log.fatal(null); log.fatal(null, null); - log.fatal("fatal statement"); + log.fatal(log.getClass().getName() + ": fatal statement"); - log.fatal("fatal statement w/ null exception", new RuntimeException()); + log.fatal(log.getClass().getName() + ": fatal statement w/ null exception", new RuntimeException()); + log.info(null); log.info(null, null); - log.info("info statement"); + log.info(log.getClass().getName() + ": info statement"); - log.info("info statement w/ null exception", new RuntimeException()); + log.info(log.getClass().getName() + ": info statement w/ null exception", new RuntimeException()); + log.trace(null); log.trace(null, null); - log.trace("trace statement"); + log.trace(log.getClass().getName() + ": trace statement"); + + log.trace(log.getClass().getName() + ": trace statement w/ null exception", new RuntimeException()); - log.trace("trace statement w/ null exception", new RuntimeException()); log.warn(null); log.warn(null, null); - log.warn("warn statement"); - - log.warn("warn statement w/ null exception", new RuntimeException()); + log.warn(log.getClass().getName() + ": warn statement"); + log.warn(log.getClass().getName() + ": warn statement w/ null exception", new RuntimeException()); } } 1.4 +5 -4 jakarta-commons/logging/src/test/org/apache/commons/logging/TestAll.java Index: TestAll.java =================================================================== RCS file: /home/cvs/jakarta-commons/logging/src/test/org/apache/commons/logging/TestAll.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TestAll.java 11 Oct 2002 04:53:21 -0000 1.3 +++ TestAll.java 19 Oct 2002 17:14:26 -0000 1.4 @@ -88,6 +88,7 @@ suite.addTest(SimpleLogTest.suite()); suite.addTest(NoOpLogTest.suite()); + suite.addTest(LogTest.suite()); return suite; } 1.1 jakarta-commons/logging/src/test/org/apache/commons/logging/LogTest.java Index: LogTest.java =================================================================== package org.apache.commons.logging; import org.apache.commons.logging.impl.SimpleLog; import junit.framework.*; /** * * * * * * */ public class LogTest extends AbstractLogTest { /** * * * @param testName * */ public LogTest(String testName) { super(testName); } /** * * * */ public Log getLogObject() { /** * Pickup whatever is found/configured! */ return LogFactory.getLog(this.getClass().getName()); } public static void main(String[] args) { String[] testCaseName = { LogTest.class.getName() }; junit.textui.TestRunner.main(testCaseName); } public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(LogTest.class); return suite; } } -- To unsubscribe, e-mail: For additional commands, e-mail: