1 package com.hp.hpl.jena.rdf.model.test; 2 3 8 9 import com.hp.hpl.jena.rdf.model.*; 10 import com.hp.hpl.jena.shared.ReificationStyle; 11 12 import junit.framework.*; 13 14 18 public class TestReifiedStatements extends ModelTestBase 19 { 20 public TestReifiedStatements( String name ) 21 { super( name ); } 22 23 public static TestSuite suite() 24 { TestSuite result = new TestSuite(); 25 result.addTest( new TestSuite( TestStandard.class ) ); 26 result.addTest( new TestSuite( TestConvenient.class ) ); 27 result.addTest( new TestSuite( TestMinimal.class ) ); 28 return result; } 29 30 public Model getModel() 31 { return ModelFactory.createDefaultModel(); } 32 33 public static class TestStandard extends AbstractTestReifiedStatements 34 { 35 public TestStandard( String name ) { super( name ); } 36 public static final ReificationStyle style = ModelFactory.Standard; 37 public Model getModel() { return ModelFactory.createDefaultModel( style ); } 38 public void testStyle() { assertEquals( style, getModel().getReificationStyle() ); } 39 } 40 41 public static class TestConvenient extends AbstractTestReifiedStatements 42 { 43 public TestConvenient( String name ) { super( name ); } 44 public static final ReificationStyle style = ModelFactory.Convenient; 45 public Model getModel() { return ModelFactory.createDefaultModel( style ); } 46 public void testStyle() { assertEquals( style, getModel().getReificationStyle() ); } 47 } 48 49 public static class TestMinimal extends AbstractTestReifiedStatements 50 { 51 public TestMinimal( String name ) { super( name ); } 52 public static final ReificationStyle style = ModelFactory.Minimal; 53 public Model getModel() { return ModelFactory.createDefaultModel( style); } 54 public void testStyle() { assertEquals( style, getModel().getReificationStyle() ); } 55 } 56 } 57 58 | Popular Tags |