forked from Qortal/qortal
28 lines
750 B
Java
28 lines
750 B
Java
|
package test;
|
||
|
|
||
|
import org.junit.AfterClass;
|
||
|
import org.junit.BeforeClass;
|
||
|
|
||
|
import repository.DataException;
|
||
|
import repository.RepositoryFactory;
|
||
|
import repository.RepositoryManager;
|
||
|
import repository.hsqldb.HSQLDBRepositoryFactory;
|
||
|
|
||
|
public class Common {
|
||
|
|
||
|
public static final String connectionUrl = "jdbc:hsqldb:file:db/test;create=true;close_result=true;sql.strict_exec=true;sql.enforce_names=true;sql.syntax_mys=true";
|
||
|
|
||
|
@BeforeClass
|
||
|
public static void setRepository() throws DataException {
|
||
|
RepositoryFactory repositoryFactory = new HSQLDBRepositoryFactory(connectionUrl);
|
||
|
|
||
|
RepositoryManager.setRepositoryFactory(repositoryFactory);
|
||
|
}
|
||
|
|
||
|
@AfterClass
|
||
|
public static void closeRepository() throws DataException {
|
||
|
// Currently a no-op?
|
||
|
}
|
||
|
|
||
|
}
|