1 6 7 package com.hp.hpl.jena.reasoner.test; 8 9 import junit.framework.*; 10 11 import com.hp.hpl.jena.graph.Graph; 12 import com.hp.hpl.jena.graph.test.AbstractTestGraph; 13 import com.hp.hpl.jena.rdf.model.ModelFactory; 14 import com.hp.hpl.jena.reasoner.InfGraph; 15 16 22 23 public class TestInfGraph extends AbstractTestGraph 24 { 25 public TestInfGraph( String name ) 26 { super( name ); } 27 28 public static TestSuite suite() 29 { return new TestSuite( TestInfGraph.class ); } 30 31 private InfGraph getInfGraph() 32 { 33 return (InfGraph) ModelFactory.createOntologyModel().getGraph(); 34 } 35 36 public Graph getGraph() 37 { return getInfGraph(); } 38 39 public void testInfGraph() 40 { 41 InfGraph ig = getInfGraph(); 42 assertSame( ig.getPrefixMapping(), ig.getRawGraph().getPrefixMapping() ); 43 } 44 45 public void testInfReification() 46 { 47 InfGraph ig = getInfGraph(); 48 assertSame( ig.getReifier(), ig.getRawGraph().getReifier() ); 49 } 50 51 54 public void testInfCapabilities() 55 { 56 assertTrue( getInfGraph().getCapabilities().findContractSafe() ); 58 } 59 } 60 61 | Popular Tags |