use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseTestNoAutoInc_DEFAULT method testIterFilterLimit.
public void testIterFilterLimit() {
Iterable<PersonUUID> people = pm.createQuery(PersonUUID.class).filter("n>", 1).order("n").iter(1);
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 BaseTestNoAutoInc_DEFAULT method testIterLimitOffsetUUID.
public void testIterLimitOffsetUUID() {
Iterable<PersonUUID> people = pm.createQuery(PersonUUID.class).order("n").iter(2, 1);
assertNotNull(people);
@SuppressWarnings("serial") ArrayList<PersonUUID> l = new ArrayList<PersonUUID>() {
{
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 BaseTestNoAutoInc_DEFAULT method testFilterOperatorEqualUUID.
public void testFilterOperatorEqualUUID() {
List<PersonUUID> l = getOrderedPersonUUIDs();
PersonUUID person = pm.createQuery(PersonUUID.class).filter("id", l.get(0).id).get();
assertNotNull(person);
assertEquals(l.get(0), person);
}
use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseTestNoAutoInc_DEFAULT method testFilterOperatorEqualString.
public void testFilterOperatorEqualString() {
PersonUUID person = pm.createQuery(PersonUUID.class).filter("firstName", "Albert").get();
assertNotNull(person);
assertEquals(UUID_EINSTEIN, person);
}
Aggregations