use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseTestNoAutoInc_BASE method getPersonUUID.
protected PersonUUID getPersonUUID(String id) {
PersonUUID p = new PersonUUID();
p.id = id;
pm.get(p);
return p;
}
use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseTestNoAutoInc_DEFAULT method testIterFullUUID.
public void testIterFullUUID() {
Iterable<PersonUUID> people = pm.createQuery(PersonUUID.class).order("n").iter();
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) {
PersonUUID p = l.get(i);
assertEquals(p, person);
i++;
}
}
use of siena.base.test.model.PersonUUID in project siena by mandubian.
the class BaseTestNoAutoInc_DEFAULT method testIterLimitUUID.
public void testIterLimitUUID() {
Iterable<PersonUUID> people = pm.createQuery(PersonUUID.class).order("n").iter(2);
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 BaseTestNoAutoInc_DEFAULT method testIterFilterLimitOffset.
public void testIterFilterLimitOffset() {
Iterable<PersonUUID> people = pm.createQuery(PersonUUID.class).filter("n>", 1).order("n").iter(2, 1);
assertNotNull(people);
PersonUUID[] array = new PersonUUID[] { UUID_EINSTEIN };
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 testGetUUID.
public void testGetUUID() {
PersonUUID curie = getPersonUUID(UUID_CURIE.id);
assertEquals(UUID_CURIE, curie);
}
Aggregations