use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.
the class BaseTest method testUpdateLongAutoID.
public void testUpdateLongAutoID() {
PersonLongAutoID curie = getPersonLongAutoID(LongAutoID_CURIE.id);
curie.lastName = "Sklodowska–Curie";
pm.update(curie);
PersonLongAutoID curie2 = getPersonLongAutoID(LongAutoID_CURIE.id);
assertEquals(curie2, curie);
}
use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.
the class BaseTest method testGetByKeyLongAutoID.
public void testGetByKeyLongAutoID() {
PersonLongAutoID curie = getByKeyPersonLongAutoID(LongAutoID_CURIE.id);
assertEquals(LongAutoID_CURIE, curie);
}
use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.
the class BaseTest method testFilterOperatorEqualLongAutoID.
public void testFilterOperatorEqualLongAutoID() {
PersonLongAutoID person = pm.createQuery(PersonLongAutoID.class).filter("id", LongAutoID_EINSTEIN.id).get();
assertNotNull(person);
assertEquals(LongAutoID_EINSTEIN, person);
}
use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.
the class BaseTest method testOrderLongAutoId.
public void testOrderLongAutoId() {
List<PersonLongAutoID> people = queryPersonLongAutoIDOrderBy("id", "", false).fetch();
assertNotNull(people);
assertEquals(3, people.size());
PersonLongAutoID[] array = new PersonLongAutoID[] { LongAutoID_TESLA, LongAutoID_CURIE, LongAutoID_EINSTEIN };
int i = 0;
for (PersonLongAutoID person : people) {
assertEquals(array[i], person);
i++;
}
}
use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.
the class BaseTest method testIterLimitOffsetLongAutoID.
public void testIterLimitOffsetLongAutoID() {
Iterable<PersonLongAutoID> people = pm.createQuery(PersonLongAutoID.class).order("n").iter(2, 1);
assertNotNull(people);
PersonLongAutoID[] array = new PersonLongAutoID[] { LongAutoID_CURIE, LongAutoID_EINSTEIN };
int i = 0;
for (PersonLongAutoID person : people) {
assertEquals(array[i], person);
i++;
}
}
Aggregations