01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2008.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.sail.rdbms;
07:
08: import org.openrdf.sail.RDFStoreTest;
09: import org.openrdf.sail.Sail;
10: import org.openrdf.sail.SailConnection;
11: import org.openrdf.sail.SailException;
12: import org.openrdf.sail.rdbms.postgresql.PgSqlStore;
13:
14: /**
15: * An extension of RDFStoreTest for testing the class {@link PgSqlStore}.
16: */
17: public class PgSqlStoreTest extends RDFStoreTest {
18:
19: /*--------------*
20: * Constructors *
21: *--------------*/
22:
23: public PgSqlStoreTest(String name) {
24: super (name);
25: }
26:
27: /*---------*
28: * Methods *
29: *---------*/
30:
31: @Override
32: protected Sail createSail() throws SailException {
33: Sail sail = new PgSqlStore("sesame_test");
34: sail.initialize();
35: SailConnection conn = sail.getConnection();
36: try {
37: conn.clear();
38: conn.clearNamespaces();
39: conn.commit();
40: } finally {
41: conn.close();
42: }
43: return sail;
44: }
45: }
|