use of siena.base.test.model.PersonLongAutoID in project siena by mandubian.
the class BaseAsyncTest method testIterLimitLongAutoID.
public void testIterLimitLongAutoID() {
SienaFuture<Iterable<PersonLongAutoID>> future = pm.createQuery(PersonLongAutoID.class).order("n").iter(2);
Iterable<PersonLongAutoID> people = future.get();
assertNotNull(people);
PersonLongAutoID[] array = new PersonLongAutoID[] { LongAutoID_TESLA, LongAutoID_CURIE };
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 BaseAsyncTest method testOrderLongAutoId.
public void testOrderLongAutoId() {
SienaFuture<List<PersonLongAutoID>> future = queryPersonLongAutoIDOrderBy("id", "", false).fetch();
List<PersonLongAutoID> people = future.get();
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 BaseAsyncTest method testIterFullLongAutoID.
public void testIterFullLongAutoID() {
SienaFuture<Iterable<PersonLongAutoID>> future = pm.createQuery(PersonLongAutoID.class).order("n").iter();
Iterable<PersonLongAutoID> people = future.get();
assertNotNull(people);
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 BaseAsyncTest method testIterLimitOffsetLongAutoID.
public void testIterLimitOffsetLongAutoID() {
SienaFuture<Iterable<PersonLongAutoID>> future = pm.createQuery(PersonLongAutoID.class).order("n").iter(2, 1);
Iterable<PersonLongAutoID> people = future.get();
assertNotNull(people);
PersonLongAutoID[] array = new PersonLongAutoID[] { 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 BaseAsyncTest method testUpdateLongAutoID.
public void testUpdateLongAutoID() {
PersonLongAutoID curie = getPersonLongAutoID(LongAutoID_CURIE.id);
curie.lastName = "Sklodowska–Curie";
pm.update(curie).get();
PersonLongAutoID curie2 = getPersonLongAutoID(LongAutoID_CURIE.id);
assertEquals(curie2, curie);
}
Aggregations