@Test
 public void whenPresent() {
   // when
   SortedSet<LocalDate> dueDates =
       creator.findDueDatesForLease(VT.ld(2012, 1, 1), VT.ld(2014, 1, 1), lease);
   // then
   assertThat(dueDates.size(), is(10));
 }
예제 #2
0
  @Before
  public void setUp() throws Exception {
    leaseTopModel = leases.findLeaseByReference("OXF-TOPMODEL-001");

    leaseTopModelServiceChargeItem =
        leaseTopModel.findItem(LeaseItemType.SERVICE_CHARGE, VT.ld(2010, 7, 15), VT.bi(1));
    assertNotNull(leaseTopModelServiceChargeItem);

    leaseTopModelRentItem =
        leaseTopModel.findItem(LeaseItemType.RENT, VT.ld(2010, 7, 15), VT.bi(1));
    assertNotNull(leaseTopModelRentItem);
  }
예제 #3
0
  @Test
  public void givenIndexableRentItem_thenCreatesTermsForThatItemOnly() throws Exception {

    // given
    assertNull(leaseTopModelRentItem.findTerm(VT.ld(2012, 7, 15)));
    assertNull(leaseTopModelServiceChargeItem.findTerm(VT.ld(2012, 7, 15)));

    // when
    leaseTopModelRentItem.verify();

    // then
    assertNotNull(leaseTopModelRentItem.findTerm(VT.ld(2012, 7, 15)));
    assertNull(leaseTopModelServiceChargeItem.findTerm(VT.ld(2012, 7, 15)));
  }