use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseAsyncTest method testIterLimitUUID.
public void testIterLimitUUID() {
SienaFuture<Iterable<PersonUUID>> future = pm.createQuery(PersonUUID.class).order("n").iter(2);
Iterable<PersonUUID> people = future.get();
assertNotNull(people);
@SuppressWarnings("serial") ArrayList<PersonUUID> l = new ArrayList<PersonUUID>() {
{
add(UUID_TESLA);
add(UUID_CURIE);
}
};
int i = 0;
for (PersonUUID person : people) {
assertEquals(l.get(i), person);
i++;
}
}
use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseAsyncTest method testIterFullUUID.
public void testIterFullUUID() {
SienaFuture<Iterable<PersonUUID>> future = pm.createQuery(PersonUUID.class).order("n").iter();
Iterable<PersonUUID> people = future.get();
assertNotNull(people);
@SuppressWarnings("serial") ArrayList<PersonUUID> l = new ArrayList<PersonUUID>() {
{
add(UUID_TESLA);
add(UUID_CURIE);
add(UUID_EINSTEIN);
}
};
int i = 0;
for (PersonUUID person : people) {
assertEquals(l.get(i), person);
i++;
}
}
use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseAsyncTest method testFilterOperatorEqualInt.
public void testFilterOperatorEqualInt() {
SienaFuture<PersonUUID> future = pm.createQuery(PersonUUID.class).filter("n", 3).get();
PersonUUID person = future.get();
assertNotNull(person);
assertEquals(UUID_EINSTEIN, person);
}
use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseAsyncTest method testIterFilterLimit.
public void testIterFilterLimit() {
SienaFuture<Iterable<PersonUUID>> future = pm.createQuery(PersonUUID.class).filter("n>", 1).order("n").iter(1);
Iterable<PersonUUID> people = future.get();
assertNotNull(people);
PersonUUID[] array = new PersonUUID[] { UUID_CURIE };
int i = 0;
for (PersonUUID PersonIntKey : people) {
assertEquals(array[i], PersonIntKey);
i++;
}
}
use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseAsyncTest method testFilterOperatorEqualString.
public void testFilterOperatorEqualString() {
SienaFuture<PersonUUID> future = pm.createQuery(PersonUUID.class).filter("firstName", "Albert").get();
PersonUUID person = future.get();
assertNotNull(person);
assertEquals(UUID_EINSTEIN, person);
}
Aggregations