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.repository.sail;
07:
08: import info.aduna.io.FileUtil;
09:
10: import java.io.File;
11: import java.io.IOException;
12:
13: import org.openrdf.repository.Repository;
14: import org.openrdf.repository.RepositoryConnectionTest;
15: import org.openrdf.sail.nativerdf.NativeStore;
16:
17: public class NativeStoreConnectionTest extends RepositoryConnectionTest {
18:
19: private File dataDir;
20:
21: public NativeStoreConnectionTest(String name) {
22: super (name);
23: }
24:
25: @Override
26: protected Repository createRepository() throws IOException {
27: dataDir = FileUtil.createTempDir("nativestore");
28: return new SailRepository(new NativeStore(dataDir, "spoc"));
29: }
30:
31: @Override
32: protected void tearDown() throws Exception {
33: try {
34: super.tearDown();
35: } finally {
36: FileUtil.deleteDir(dataDir);
37: }
38: }
39: }
|