/*
* Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
*
* Licensed under the Aduna BSD-style license.
*/
package org.openrdf.sail.nativerdf;
import java.io.File;
import info.aduna.io.FileUtil;
import org.openrdf.sail.RDFStoreTest;
import org.openrdf.sail.Sail;
import org.openrdf.sail.SailException;
/**
* An extension of RDFStoreTest for testing the class {@link NativeStore}.
*/
public class NativeStoreTest extends RDFStoreTest {
/*-----------*
* Variables *
*-----------*/
private File dataDir;
/*--------------*
* Constructors *
*--------------*/
public NativeStoreTest(String name) {
super(name);
}
/*---------*
* Methods *
*---------*/
@Override
protected void setUp()
throws Exception
{
dataDir = FileUtil.createTempDir("nativestore");
super.setUp();
}
@Override
protected void tearDown()
throws Exception
{
super.tearDown();
FileUtil.deleteDir(dataDir);
}
@Override
protected Sail createSail()
throws SailException
{
Sail sail = new NativeStore(dataDir, "spoc,posc");
sail.initialize();
return sail;
}
}