use of com.orientechnologies.orient.test.domain.business.Account in project orientdb by orientechnologies.
the class CRUDObjectPhysicalTest method testUpdate.
@Test(dependsOnMethods = "update")
public void testUpdate() {
int i = 0;
Account a;
for (OObjectIteratorClass<Account> iterator = database.browseClass("Account"); iterator.hasNext(); ) {
iterator.setFetchPlan("*:1");
a = iterator.next();
if (i % 2 == 0)
Assert.assertEquals(a.getAddresses().get(0).getCity().getCountry().getName(), "Spain");
else
Assert.assertEquals(a.getAddresses().get(0).getCity().getCountry().getName(), "Italy");
Assert.assertEquals(a.getSalary(), i + 500.1f);
i++;
}
}
use of com.orientechnologies.orient.test.domain.business.Account in project orientdb by orientechnologies.
the class CRUDObjectPhysicalTestSchemaFull method queryPerFloat.
@Test(dependsOnMethods = "checkLazyLoadingOff")
public void queryPerFloat() {
final List<Account> result = database.query(new OSQLSynchQuery<ODocument>("select * from Account where salary = 500.10"));
Assert.assertTrue(result.size() > 0);
Account account;
for (int i = 0; i < result.size(); ++i) {
account = result.get(i);
Assert.assertEquals(account.getSalary(), 500.10f);
}
}
use of com.orientechnologies.orient.test.domain.business.Account in project orientdb by orientechnologies.
the class CRUDObjectPhysicalTestSchemaFull method testUpdate.
@Test(dependsOnMethods = "update")
public void testUpdate() {
int i = 0;
Account a;
for (OObjectIteratorCluster<Account> iterator = database.browseCluster("Account"); iterator.hasNext(); ) {
iterator.setFetchPlan("*:1");
a = iterator.next();
if (i % 2 == 0)
Assert.assertEquals(a.getAddresses().get(0).getCity().getCountry().getName(), "Spain");
else
Assert.assertEquals(a.getAddresses().get(0).getCity().getCountry().getName(), "Italy");
Assert.assertEquals(a.getSalary(), i + 500.1f);
i++;
}
}
Aggregations