public class DatabaseTestUtils extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
DatabaseTestUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
createDatabase(String resourcePath,
File dbCreationDir)
Get access to the database stored in the given file.
|
static void |
createDatabase(String resourcePath,
String dbname,
File dbCreationDir)
Get access to the database stored in the given file.
|
static void |
createHDDB(String resourcePath,
String dbname,
File dbCreationDir)
Get a connection to the given sample harvest definition database and fool the HD DB connect class into thinking
it should use that one.
|
static void |
dropDatabase()
Drop access to the database that's currently taken.
|
static void |
dropHDDB()
Drop the connection to the harvest definition database.
|
protected static final org.slf4j.Logger log
public DatabaseTestUtils()
public static void createDatabase(String resourcePath, String dbname, File dbCreationDir) throws Exception
resourcePath
- A file that contains a test database.dbCreationDir
- Exception
public static void createDatabase(String resourcePath, File dbCreationDir) throws Exception
resourcePath
- A file that contains a test database.dbCreationDir
- Exception
public static void createHDDB(String resourcePath, String dbname, File dbCreationDir) throws Exception
resourcePath
- Location of the sql files to create and populate the test DB.dbCreationDir
- Exception
public static void dropDatabase() throws Exception
Exception
Copyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.