Search in sources :

Example 11 with Address

use of com.orientechnologies.orient.test.domain.business.Address in project orientdb by orientechnologies.

the class CRUDObjectPhysicalTest method createLinked.

@Test(dependsOnMethods = "testUpdate")
public void createLinked() {
    long profiles = database.countClass("Profile");
    Profile neo = new Profile("Neo").setValue("test").setLocation(new Address("residence", new City(new Country("Spain"), "Madrid"), "Rio de Castilla"));
    neo.addFollowing(new Profile("Morpheus"));
    neo.addFollowing(new Profile("Trinity"));
    database.save(neo);
    Assert.assertEquals(database.countClass("Profile"), profiles + 3);
}
Also used : Address(com.orientechnologies.orient.test.domain.business.Address) Country(com.orientechnologies.orient.test.domain.business.Country) City(com.orientechnologies.orient.test.domain.business.City) Profile(com.orientechnologies.orient.test.domain.whiz.Profile) Test(org.testng.annotations.Test)

Aggregations

Address (com.orientechnologies.orient.test.domain.business.Address)11 Test (org.testng.annotations.Test)10 City (com.orientechnologies.orient.test.domain.business.City)6 Account (com.orientechnologies.orient.test.domain.business.Account)5 Country (com.orientechnologies.orient.test.domain.business.Country)4 Profile (com.orientechnologies.orient.test.domain.whiz.Profile)4 OCommandSQL (com.orientechnologies.orient.core.sql.OCommandSQL)3 OSQLSynchQuery (com.orientechnologies.orient.core.sql.query.OSQLSynchQuery)2 Company (com.orientechnologies.orient.test.domain.business.Company)2 DatabaseAbstractTest (com.orientechnologies.DatabaseAbstractTest)1 OObjectDatabaseTx (com.orientechnologies.orient.object.db.OObjectDatabaseTx)1 EnumTest (com.orientechnologies.orient.test.domain.base.EnumTest)1 ArrayList (java.util.ArrayList)1