From 2649aa8c6d2ded7b0ba1b0c5fde6605c8fde92ca Mon Sep 17 00:00:00 2001 From: Simon Kitching Date: Wed, 6 Jul 2005 12:09:58 +0000 Subject: [PATCH] Remove unused constructor Set necessary System properties in code rather than assuming build.xml will set them. Call LogFactory.releaseAll before each test for cleanliness. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209451 13f79535-47bb-0310-9956-ffa450edef68 --- .../logging/simple/CustomConfigTestCase.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java b/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java index e341faf..367d368 100644 --- a/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java +++ b/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java @@ -24,6 +24,7 @@ import java.util.List; import junit.framework.Test; import junit.framework.TestSuite; +import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.impl.SimpleLog; @@ -37,19 +38,6 @@ import org.apache.commons.logging.impl.SimpleLog; public class CustomConfigTestCase extends DefaultConfigTestCase { - // ----------------------------------------------------------- Constructors - - - /** - *

Construct a new instance of this test case.

- * - * @param name Name of the test case - */ - public CustomConfigTestCase(String name) { - super(name); - } - - // ----------------------------------------------------- Instance Variables @@ -77,11 +65,26 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { // ------------------------------------------- JUnit Infrastructure Methods + /** + * Set system properties that will control the LogFactory/Log objects + * when they are created. Subclasses can override this method to + * define properties that suit them. + */ + public void setProperties() { + System.setProperty( + "org.apache.commons.logging.Log", + "org.apache.commons.logging.simple.DecoratedSimpleLog"); + System.setProperty( + "org.apache.commons.logging.simplelog.defaultlog", + "debug"); + } /** * Set up instance variables required by this test case. */ public void setUp() throws Exception { + LogFactory.releaseAll(); + setProperties(); expected = new ArrayList(); setUpFactory(); setUpLog("DecoratedLogger");