1 17 package org.apache.tools.ant.util; 18 19 import junit.framework.TestCase; 20 21 import java.io.File ; 22 23 26 public class JAXPUtilsTest extends TestCase { 27 public JAXPUtilsTest(String name){ 28 super(name); 29 } 30 31 public void testGetSystemId(){ 32 File file = null; 33 if ( File.separatorChar == '\\' ){ 34 file = new File ("d:\\jdk"); 35 } else { 36 file = new File ("/user/local/bin"); 37 } 38 String systemid = JAXPUtils.getSystemId(file); 39 assertTrue("SystemIDs should start by file:///", systemid.startsWith("file:///")); 40 assertTrue("SystemIDs should not start with file:////", !systemid.startsWith("file:////")); 41 } 42 } 43 | Popular Tags |