1 6 package com.hp.hpl.jena.db.test; 7 8 import java.sql.SQLException ; 9 10 import junit.framework.TestSuite; 11 12 import com.hp.hpl.jena.db.*; 13 import com.hp.hpl.jena.rdf.model.*; 14 import com.hp.hpl.jena.rdf.model.test.*; 15 import com.hp.hpl.jena.shared.JenaException; 16 17 21 public class TestModelRDB extends AbstractTestModel 22 { 23 public TestModelRDB( String name ) 24 { super( name ); } 25 26 public static TestSuite suite() 27 { return new TestSuite( TestModelRDB.class ); } 28 29 private IDBConnection con; 30 private int count = 0; 31 32 public void setUp() 33 { con = TestConnection.makeAndCleanTestConnection(); 34 super.setUp(); } 35 36 public void tearDown() 37 { try { con.close(); } 38 catch (SQLException e) { throw new JenaException( e ); } } 39 40 public Model getModel() 41 { 42 return ModelRDB.createModel( con, "db-test-model-" + ++count ); 43 } 44 } 45 46 47 | Popular Tags |