use of org.estatio.module.lease.dom.LeaseRepository in project estatio by estatio.
the class BudgetAssignmentService_Test method before.
@Before
public void before() throws Exception {
budgetAssignmentService = new BudgetAssignmentService();
o1 = new Occupancy();
leaseWith1ActiveOccupancy = new Lease() {
@Override
public SortedSet<Occupancy> getOccupancies() {
return new TreeSet<>(Arrays.asList(o1));
}
};
o2 = new Occupancy();
o3 = new Occupancy();
leaseWith2ActiveOccupancies = new Lease() {
@Override
public SortedSet<Occupancy> getOccupancies() {
return new TreeSet<>(Arrays.asList(o2, o3));
}
};
o4 = new Occupancy();
leaseWithNoActiveOccupancies = new Lease() {
@Override
public SortedSet<Occupancy> getOccupancies() {
return new TreeSet<>(Arrays.asList(o4));
}
};
o5 = new Occupancy();
leaseTerminated = new Lease() {
@Override
public SortedSet<Occupancy> getOccupancies() {
return new TreeSet<>(Arrays.asList(o5));
}
};
budget = new Budget();
LocalDate startDate = new LocalDate(2015, 01, 01);
LocalDate endDate = new LocalDate(2015, 12, 31);
budget.setStartDate(startDate);
budget.setEndDate(endDate);
LeaseRepository leaseRepository = new LeaseRepository() {
@Override
public List<Lease> findLeasesByProperty(final Property property) {
return Arrays.asList(leaseWith1ActiveOccupancy, leaseWith2ActiveOccupancies, leaseWithNoActiveOccupancies, leaseTerminated);
}
};
budgetAssignmentService.leaseRepository = leaseRepository;
}
Aggregations