You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jb...@apache.org on 2004/11/09 05:10:09 UTC

svn commit: rev 56995 - geronimo/trunk/modules/common/src/test/org/apache/geronimo/common/propertyeditor

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);
     }
 }