Search in sources :

Example 1 with OccupancyRepository

use of org.estatio.module.lease.dom.occupancy.OccupancyRepository in project estatio by estatio.

the class OccupancyRepository_Test method setup.

@Before
public void setup() {
    lease = new Lease();
    unit = new Unit();
    startDate = new LocalDate(2013, 4, 1);
    occupancyRepository = new OccupancyRepository() {

        @Override
        protected <T> T firstMatch(Query<T> query) {
            finderInteraction = new FinderInteraction(query, FinderMethod.FIRST_MATCH);
            return null;
        }

        @Override
        protected List<Occupancy> allInstances() {
            finderInteraction = new FinderInteraction(null, FinderMethod.ALL_INSTANCES);
            return null;
        }

        @Override
        protected <T> List<T> allMatches(Query<T> query) {
            finderInteraction = new FinderInteraction(query, FinderMethod.ALL_MATCHES);
            return null;
        }
    };
}
Also used : OccupancyRepository(org.estatio.module.lease.dom.occupancy.OccupancyRepository) List(java.util.List) Unit(org.estatio.module.asset.dom.Unit) LocalDate(org.joda.time.LocalDate) FinderInteraction(org.incode.module.unittestsupport.dom.repo.FinderInteraction) Before(org.junit.Before)

Aggregations

List (java.util.List)1 Unit (org.estatio.module.asset.dom.Unit)1 OccupancyRepository (org.estatio.module.lease.dom.occupancy.OccupancyRepository)1 FinderInteraction (org.incode.module.unittestsupport.dom.repo.FinderInteraction)1 LocalDate (org.joda.time.LocalDate)1 Before (org.junit.Before)1