1 6 7 package com.hp.hpl.jena.graph.compose.test; 8 9 12 13 import java.lang.reflect.*; 14 import com.hp.hpl.jena.graph.*; 15 import com.hp.hpl.jena.graph.test.*; 16 import com.hp.hpl.jena.mem.*; 17 import com.hp.hpl.jena.shared.*; 18 19 24 public class TestCaseBasic extends com.hp.hpl.jena.regression.TestCaseBasic 25 { 26 private Class graphClass; 27 28 public TestCaseBasic(String name, Class graphClass) 29 { 30 super(name); 31 this.graphClass = graphClass; 32 } 33 34 private Graph newGraph( Constructor cons ) 35 { 36 try { return (Graph) cons.newInstance( new Object [] { new GraphMem(), new GraphMem() } ); } 37 catch (Exception e) { throw new JenaException( "newGraph failed:", e ); } 38 } 39 40 public void setUp() 41 { 42 try 43 { 44 Constructor constructor = graphClass.getConstructor(new Class []{ 45 Graph.class, Graph.class }); 46 m1 = GraphTestBase.modelFor( newGraph( constructor ) ); 47 m2 = GraphTestBase.modelFor( newGraph( constructor ) ); 48 m3 = GraphTestBase.modelFor( newGraph( constructor ) ); 49 m4 = GraphTestBase.modelFor( newGraph( constructor ) ); 50 } 51 catch (Exception e) 52 {} 53 } 54 } 55 56 85 | Popular Tags |