use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractQueryTest method script35.
@Test
public void script35() {
QueryBuilder<Person> qb = this.module.newQueryBuilder(Person.class);
Person person = templateFor(Person.class);
Query<Person> query = unitOfWork.newQuery(qb.where(containsName(person.accounts(), "anns")));
System.out.println("*** script35: " + query);
verifyUnorderedResults(query, "Jack Doe", "Ann Doe");
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractEntityFinderTest method script06.
@Test
public void script06() throws EntityFinderException {
Person person = templateFor(Person.class);
// should return Joe and Ann Doe
Iterable<EntityReference> entities = entityFinder.findEntities(Person.class, ge(person.yearOfBirth(), 1973), NO_SORTING, NO_FIRST_RESULT, NO_MAX_RESULTS, NO_VARIABLES);
assertNames(entities, JOE, ANN);
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractEntityFinderTest method script04.
@Test
public void script04() throws EntityFinderException {
Person person = templateFor(Person.class);
// should return Joe and Ann Doe
Iterable<EntityReference> entities = entityFinder.findEntities(Person.class, eq(person.placeOfBirth().get().name(), "Kuala Lumpur"), NO_SORTING, NO_FIRST_RESULT, NO_MAX_RESULTS, NO_VARIABLES);
assertNames(entities, JOE, ANN);
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractEntityFinderTest method script11.
@Test
public void script11() throws EntityFinderException {
Person person = templateFor(Person.class);
// should return Joe Doe
Iterable<EntityReference> entities = entityFinder.findEntities(Person.class, isNotNull(person.email()), NO_SORTING, NO_FIRST_RESULT, NO_MAX_RESULTS, NO_VARIABLES);
assertNames(entities, JOE);
}
use of org.qi4j.test.indexing.model.Person in project qi4j-sdk by Qi4j.
the class AbstractEntityFinderTest method script05.
@Test
public void script05() throws EntityFinderException {
Person person = templateFor(Person.class);
// should return Joe Doe
Iterable<EntityReference> entities = entityFinder.findEntities(Person.class, eq(person.mother().get().placeOfBirth().get().name(), "Kuala Lumpur"), NO_SORTING, NO_FIRST_RESULT, NO_MAX_RESULTS, NO_VARIABLES);
assertNames(entities, JOE);
}
Aggregations