1 17 18 package org.apache.geronimo.common.propertyeditor; 19 20 import java.beans.PropertyEditorManager ; 21 import java.util.List ; 22 23 import junit.framework.TestCase; 24 25 30 public class PropertyEditorsTest 31 extends TestCase 32 { 33 private String [] editorSearchPath; 34 35 public void testDefaultEditorSearchPath() 36 { 37 String element = "org.apache.geronimo.common.propertyeditor"; 38 List path = PropertyEditors.getEditorSearchPath(); 39 assertNotNull(path); 40 assertEquals(element, path.get(path.size() - 1)); 41 } 42 43 public void testAppendEditorSearchPath() 44 { 45 String element = "my.path"; 46 PropertyEditors.appendEditorSearchPath(element); 47 List path = PropertyEditors.getEditorSearchPath(); 48 assertNotNull(path); 49 assertEquals(element, path.get(path.size() - 1)); 50 } 51 52 protected void setUp() throws Exception { 53 editorSearchPath = PropertyEditorManager.getEditorSearchPath(); 54 } 55 56 protected void tearDown() throws Exception { 57 PropertyEditorManager.setEditorSearchPath(editorSearchPath); 58 } 59 } 60 | Popular Tags |