You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sk...@apache.org on 2005/07/06 14:10:01 UTC
svn commit: r209451 -
/jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java
Author: skitching
Date: Wed Jul 6 05:09:58 2005
New Revision: 209451
URL: http://svn.apache.org/viewcvs?rev=209451&view=rev
Log:
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.
Modified:
jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java
Modified: jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java?rev=209451&r1=209450&r2=209451&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java (original)
+++ jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/simple/CustomConfigTestCase.java Wed Jul 6 05:09:58 2005
@@ -24,6 +24,7 @@
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 @@
public class CustomConfigTestCase extends DefaultConfigTestCase {
- // ----------------------------------------------------------- Constructors
-
-
- /**
- * <p>Construct a new instance of this test case.</p>
- *
- * @param name Name of the test case
- */
- public CustomConfigTestCase(String name) {
- super(name);
- }
-
-
// ----------------------------------------------------- Instance Variables
@@ -77,11 +65,26 @@
// ------------------------------------------- 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");
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org