1 6 7 package com.hp.hpl.jena.rdf.model.test; 8 9 import com.hp.hpl.jena.rdf.model.*; 10 import com.hp.hpl.jena.rdf.model.impl.*; 11 import com.hp.hpl.jena.shared.*; 12 import junit.framework.*; 13 14 17 public class TestHiddenStatements extends ModelTestBase 18 { 19 public TestHiddenStatements(String name) 20 { super(name); } 21 22 public static TestSuite suite() 23 { return new TestSuite( TestHiddenStatements.class ); } 24 25 public void assertSameMapping( PrefixMapping L, PrefixMapping R ) 26 { 27 if (sameMapping( L, R ) == false) 28 fail( "wanted " + L + " but got " + R ); 29 } 30 31 public boolean sameMapping( PrefixMapping L, PrefixMapping R ) 32 { 33 return L.getNsPrefixMap().equals( R.getNsPrefixMap() ); 36 } 37 38 43 public void testPrefixCopied() 44 { 45 Model m = ModelFactory.createDefaultModel(); 46 m.setNsPrefixes( PrefixMapping.Standard ); 47 assertSameMapping( PrefixMapping.Standard, ModelReifier.withHiddenStatements( m ) ); 48 } 49 } 50 51 52 | Popular Tags |