@Test public void script15() throws EntityFinderException { QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class ); Male person = templateFor( Male.class ); Query<Person> query = unitOfWork.newQuery( qb.where( isNull( person.wife() ) ) ); System.out.println( "*** script15: " + query ); verifyUnorderedResults( query, "Joe Doe", "Ann Doe" ); }
@Test public void script14() throws EntityFinderException { QueryBuilder<Male> qb = this.module.newQueryBuilder( Male.class ); Male person = templateFor( Male.class ); Query<Male> query = unitOfWork.newQuery( qb.where( isNull( person.wife() ) ) ); System.out.println( "*** script14: " + query ); verifyUnorderedResults( query, "Joe Doe" ); }
@Test public void script12() throws EntityFinderException { QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class ); Person person = templateFor( Person.class ); Query<Person> query = unitOfWork.newQuery( qb.where( isNull( person.email() ) ) ); System.out.println( "*** script12: " + query ); verifyUnorderedResults( query, "Ann Doe", "Jack Doe" ); }
@Test public void script15() throws EntityFinderException { Male person = templateFor( Male.class ); // should return Ann and Joe Doe Iterable<EntityReference> entities = entityFinder.findEntities( Person.class, isNull( person.wife() ), NO_SORTING, NO_FIRST_RESULT, NO_MAX_RESULTS, NO_VARIABLES ); assertNames( entities, ANN, JOE ); }
@Test public void script12() throws EntityFinderException { Person person = templateFor( Person.class ); // should return Ann and Jack Doe Iterable<EntityReference> entities = entityFinder.findEntities( Person.class, isNull( person.email() ), NO_SORTING, NO_FIRST_RESULT, NO_MAX_RESULTS, NO_VARIABLES ); assertNames( entities, ANN, JACK ); }
@Test public void script14() throws EntityFinderException { Male person = templateFor( Male.class ); // should return Joe Doe Iterable<EntityReference> entities = entityFinder.findEntities( Male.class, isNull( person.wife() ), NO_SORTING, NO_FIRST_RESULT, NO_MAX_RESULTS, NO_VARIABLES ); assertNames( entities, JOE ); }