use of com.orientechnologies.orient.object.db.OObjectDatabaseTx in project orientdb by orientechnologies.
the class DbCreationTest method testDbCreationNoSecurity.
public void testDbCreationNoSecurity() throws IOException {
if (!url.startsWith(OEngineRemote.NAME)) {
ODatabaseDocument db = new ODatabaseDocumentTx(url);
db.setProperty("security", OSecurityNull.class);
ODatabaseHelper.dropDatabase(db, "server", getStorageType());
ODatabaseHelper.createDatabase(db, url, getStorageType());
ODatabaseHelper.dropDatabase(db, "server", getStorageType());
database = new OObjectDatabaseTx(url);
database.setProperty("security", OSecurityNull.class);
ODatabaseHelper.dropDatabase(database, "server", getStorageType());
ODatabaseHelper.createDatabase(database, url, getStorageType());
ODatabaseHelper.dropDatabase(database, "server", getStorageType());
}
}
use of com.orientechnologies.orient.object.db.OObjectDatabaseTx in project orientdb by orientechnologies.
the class DbCreationTest method testRoles.
@Test(dependsOnMethods = { "testChangeLocale" })
public void testRoles() throws IOException {
database = new OObjectDatabaseTx(url);
database.open("admin", "admin");
database.query(new OSQLSynchQuery<ORole>("select from ORole where name = 'admin'"));
database.close();
}
use of com.orientechnologies.orient.object.db.OObjectDatabaseTx in project orientdb by orientechnologies.
the class DbCreationTest method testDbOpenWithLastAsSlash.
@Test(dependsOnMethods = { "testDbOpen" })
public void testDbOpenWithLastAsSlash() {
database = new OObjectDatabaseTx(url + "/");
database.open("admin", "admin");
database.close();
}
use of com.orientechnologies.orient.object.db.OObjectDatabaseTx in project orientdb by orientechnologies.
the class DbCreationTest method testDbOpenWithBackSlash.
@Test(dependsOnMethods = { "testDbOpenWithLastAsSlash" })
public void testDbOpenWithBackSlash() {
database = new OObjectDatabaseTx(url.replace('/', '\\'));
database.open("admin", "admin");
database.close();
}
use of com.orientechnologies.orient.object.db.OObjectDatabaseTx in project orientdb by orientechnologies.
the class DbCreationTest method testChangeLocale.
@Test(dependsOnMethods = { "testDbOpenWithBackSlash" })
public void testChangeLocale() throws IOException {
database = new OObjectDatabaseTx(url);
database.open("admin", "admin");
database.getStorage().getConfiguration().setLocaleLanguage(Locale.ENGLISH.getLanguage());
database.getStorage().getConfiguration().setLocaleCountry(Locale.ENGLISH.getCountry());
database.getStorage().getConfiguration().update();
database.close();
}
Aggregations