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