geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: rev 56995 - geronimo/trunk/modules/common/src/test/org/apache/geronimo/common/propertyeditor
Date Tue, 09 Nov 2004 04:10:09 GMT
Author: jboynes
Date: Mon Nov  8 20:10:09 2004
New Revision: 56995

Modified:
   geronimo/trunk/modules/common/src/test/org/apache/geronimo/common/propertyeditor/PropertyEditorsTest.java
Log:
do not rely on tests running in a specifci order

Modified: geronimo/trunk/modules/common/src/test/org/apache/geronimo/common/propertyeditor/PropertyEditorsTest.java
==============================================================================
--- geronimo/trunk/modules/common/src/test/org/apache/geronimo/common/propertyeditor/PropertyEditorsTest.java
(original)
+++ geronimo/trunk/modules/common/src/test/org/apache/geronimo/common/propertyeditor/PropertyEditorsTest.java
Mon Nov  8 20:10:09 2004
@@ -20,6 +20,7 @@
 import java.util.List;
 
 import java.beans.PropertyEditor;
+import java.beans.PropertyEditorManager;
 
 import junit.framework.TestCase;
 
@@ -31,6 +32,8 @@
 public class PropertyEditorsTest
     extends TestCase
 {
+    private String[] editorSearchPath;
+
     public void testDefaultEditorSearchPath()
     {
         String element = "org.apache.geronimo.common.propertyeditor";
@@ -46,5 +49,13 @@
         List path = PropertyEditors.getEditorSearchPath();
         assertNotNull(path);
         assertEquals(element, path.get(path.size() - 1));
+    }
+
+    protected void setUp() throws Exception {
+        editorSearchPath = PropertyEditorManager.getEditorSearchPath();
+    }
+
+    protected void tearDown() throws Exception {
+        PropertyEditorManager.setEditorSearchPath(editorSearchPath);
     }
 }

Mime
View raw message