1 7 8 package com.hp.hpl.jena.rdf.arp.test; 9 import org.apache.commons.logging.*; 10 import junit.framework.*; 11 12 import com.hp.hpl.jena.rdf.arp.*; 13 18 public class URITests 19 extends TestCase { 20 static public Test suite() { 21 TestSuite suite = new TestSuite("URIs"); 22 suite.addTest(new URITests("testNoDomain")); 23 return suite; 25 } 26 27 URITests(String s) { 28 super(s); 29 } 30 31 public void testURI(String uri, boolean ok) { 32 try { 33 new URI(uri); 34 assertTrue("<" + uri + "> is not a URI", ok); 35 } 36 catch (MalformedURIException e){ 37 assertFalse("<" + uri + "> is a URI", ok); 39 } 40 } 41 public void testNoDomain() { 42 testURI("app://calendar/event",true); 43 } 44 public void testLong() { 45 testURI("http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3",true); 46 } 47 48 } 49 50 | Popular Tags |