01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.sail.nativerdf;
07:
08: import java.io.File;
09:
10: import info.aduna.io.FileUtil;
11:
12: import org.openrdf.sail.RDFStoreTest;
13: import org.openrdf.sail.Sail;
14: import org.openrdf.sail.SailException;
15:
16: /**
17: * An extension of RDFStoreTest for testing the class {@link NativeStore}.
18: */
19: public class NativeStoreTest extends RDFStoreTest {
20:
21: /*-----------*
22: * Variables *
23: *-----------*/
24:
25: private File dataDir;
26:
27: /*--------------*
28: * Constructors *
29: *--------------*/
30:
31: public NativeStoreTest(String name) {
32: super (name);
33: }
34:
35: /*---------*
36: * Methods *
37: *---------*/
38:
39: @Override
40: protected void setUp() throws Exception {
41: dataDir = FileUtil.createTempDir("nativestore");
42: super .setUp();
43: }
44:
45: @Override
46: protected void tearDown() throws Exception {
47: super .tearDown();
48: FileUtil.deleteDir(dataDir);
49: }
50:
51: @Override
52: protected Sail createSail() throws SailException {
53: Sail sail = new NativeStore(dataDir, "spoc,posc");
54: sail.initialize();
55: return sail;
56: }
57: }
|