1 6 7 package com.hp.hpl.jena.shared.test; 8 9 import com.hp.hpl.jena.shared.*; 10 import com.hp.hpl.jena.shared.impl.*; 11 import com.hp.hpl.jena.vocabulary.*; 12 import junit.framework.*; 13 14 18 19 public class TestPrefixMapping extends AbstractTestPrefixMapping 20 { 21 public TestPrefixMapping( String name ) 22 { super( name ); } 23 24 public static TestSuite suite() 25 { return new TestSuite( TestPrefixMapping.class ); } 26 27 protected PrefixMapping getMapping() 28 { return new PrefixMappingImpl(); } 29 30 public void testStandard() 31 { testStandard( PrefixMapping.Standard ); } 32 33 public void testExtended() 34 { testExtended( PrefixMapping.Extended ); } 35 36 public void testStandard( PrefixMapping st ) 37 { 38 assertEquals( RDF.getURI(), st.getNsPrefixURI( "rdf" ) ); 39 assertEquals( RDFS.getURI(), st.getNsPrefixURI( "rdfs" ) ); 40 assertEquals( DC.getURI(), st.getNsPrefixURI( "dc" ) ); 41 assertEquals( OWL.getURI(), st.getNsPrefixURI( "owl" ) ); 42 assertEquals( DAMLVocabulary.NAMESPACE_DAML_2001_03_URI, st.getNsPrefixURI( "daml" ) ); 43 } 44 45 public void testExtended( PrefixMapping st ) 46 { 47 testStandard( st ); 48 assertEquals( RSS.getURI(), st.getNsPrefixURI( "rss" ) ); 49 assertEquals( VCARD.getURI(), st.getNsPrefixURI( "vcard" ) ); 50 assertEquals( JenaModelSpec.getURI(), st.getNsPrefixURI( "jms" ) ); 51 } 52 53 } 54 55 56 | Popular Tags |