1 10 package com.hp.hpl.jena.reasoner.rulesys.test; 11 12 import java.io.IOException ; 13 14 import com.hp.hpl.jena.reasoner.*; 15 import com.hp.hpl.jena.reasoner.rulesys.*; 16 import com.hp.hpl.jena.reasoner.test.ReasonerTester; 17 18 import junit.framework.TestCase; 19 import junit.framework.TestSuite; 20 import org.apache.commons.logging.Log; 21 import org.apache.commons.logging.LogFactory; 22 import java.util.*; 23 24 30 public class TestLPRDFS extends TestCase { 31 32 33 public static final String RULE_FILE = "etc/rdfs-fb-lp-expt.rules"; 34 35 36 protected static List ruleSet; 37 38 39 protected ReasonerTester tester; 40 41 static Log logger = LogFactory.getLog(TestLPRDFS.class); 42 43 46 public TestLPRDFS( String name ) { 47 super( name ); 48 } 49 50 54 public static TestSuite suite() { 55 return new TestSuite(TestLPRDFS.class); 56 } 68 69 public void test1() throws IOException { 70 doTest("test1"); 71 } 72 73 public void test2() throws IOException { 74 doTest("test2"); 75 } 76 77 public void test3() throws IOException { 78 doTest("test3"); 79 } 80 81 public void test4() throws IOException { 82 doTest("test4"); 83 } 84 85 public void test5() throws IOException { 86 doTest("test5"); 87 } 88 89 public void test6() throws IOException { 90 doTest("test6"); 91 } 92 93 public void test7() throws IOException { 94 doTest("test7"); 95 } 96 97 public void test8() throws IOException { 98 doTest("test8"); 99 } 100 101 public void test9() throws IOException { 102 doTest("test9"); 103 } 104 105 public void test10() throws IOException { 106 doTest("test10"); 107 } 108 109 public void test11() throws IOException { 110 doTest("test11"); 111 } 112 113 public void test12() throws IOException { 114 doTest("test12"); 115 } 116 117 public void test13() throws IOException { 118 doTest("test13"); 119 } 120 121 public void test14() throws IOException { 122 doTest("test14"); 123 } 124 125 public void test15() throws IOException { 126 doTest("test15"); 127 } 128 129 public void test16() throws IOException { 130 doTest("test16"); 131 } 132 133 public void test18() throws IOException { 134 doTest("test18"); 135 } 136 137 public void test20() throws IOException { 138 doTest("test20"); 139 } 140 141 144 public void doTest(String name) throws IOException { 145 ReasonerTester tester = new ReasonerTester("rdfs/manifest-nodirect-noresource.rdf"); 146 tester.runTest(ReasonerTester.BASE_URI + "rdfs/" + name, makeReasoner(), this); 147 } 148 149 152 public static Reasoner makeReasoner() { 153 FBRuleReasoner reasoner = new FBRuleReasoner(loadRules()); 154 return reasoner; 156 } 157 158 161 public static List loadRules() { 162 if (ruleSet == null) ruleSet = FBRuleReasoner.loadRules( RULE_FILE ); 163 return ruleSet; 164 } 165 166 } 167 168 169 170 | Popular Tags |