Search in sources :

Example 6 with OObjectDatabaseTx

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());
    }
}
Also used : ODatabaseDocument(com.orientechnologies.orient.core.db.document.ODatabaseDocument) OObjectDatabaseTx(com.orientechnologies.orient.object.db.OObjectDatabaseTx) ODatabaseDocumentTx(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx)

Example 7 with OObjectDatabaseTx

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();
}
Also used : ORole(com.orientechnologies.orient.core.metadata.security.ORole) OObjectDatabaseTx(com.orientechnologies.orient.object.db.OObjectDatabaseTx)

Example 8 with OObjectDatabaseTx

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();
}
Also used : OObjectDatabaseTx(com.orientechnologies.orient.object.db.OObjectDatabaseTx)

Example 9 with OObjectDatabaseTx

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();
}
Also used : OObjectDatabaseTx(com.orientechnologies.orient.object.db.OObjectDatabaseTx)

Example 10 with OObjectDatabaseTx

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();
}
Also used : OObjectDatabaseTx(com.orientechnologies.orient.object.db.OObjectDatabaseTx)

Aggregations

OObjectDatabaseTx (com.orientechnologies.orient.object.db.OObjectDatabaseTx)48 Test (org.testng.annotations.Test)25 ORID (com.orientechnologies.orient.core.id.ORID)15 ODocument (com.orientechnologies.orient.core.record.impl.ODocument)14 HashMap (java.util.HashMap)11 HashSet (java.util.HashSet)11 Map (java.util.Map)9 ORecordId (com.orientechnologies.orient.core.id.ORecordId)8 EnumTest (com.orientechnologies.orient.test.domain.base.EnumTest)8 JavaAttachDetachTestClass (com.orientechnologies.orient.test.domain.base.JavaAttachDetachTestClass)8 Planet (com.orientechnologies.orient.test.domain.base.Planet)8 Satellite (com.orientechnologies.orient.test.domain.base.Satellite)8 Child (com.orientechnologies.orient.test.domain.business.Child)8 Set (java.util.Set)8 ArrayList (java.util.ArrayList)5 Proxy (javassist.util.proxy.Proxy)5 BeforeClass (org.testng.annotations.BeforeClass)5 CycleChild (com.orientechnologies.orient.test.domain.cycle.CycleChild)4 GrandChild (com.orientechnologies.orient.test.domain.cycle.GrandChild)4 LazyChild (com.orientechnologies.orient.test.domain.lazy.LazyChild)4