use of org.mifos.accounts.savings.interest.schedule.internal.DailyInterestScheduledEvent in project head by mifos.
the class DailyInterestScheduledEventTest method shouldReturnTrueForAnyMatchingDate.
@Test
public void shouldReturnTrueForAnyMatchingDate() {
// setup
int every = 2;
dailyEvent = new DailyInterestScheduledEvent(every);
// exercise test
boolean isMatch = dailyEvent.isAMatchingDate(jan1st, jan2nd);
assertTrue(isMatch);
}
use of org.mifos.accounts.savings.interest.schedule.internal.DailyInterestScheduledEvent in project head by mifos.
the class DailyInterestScheduledEventTest method shouldReturnFirstDateOfPeriodOfMatchingDailyDate.
@Test
public void shouldReturnFirstDateOfPeriodOfMatchingDailyDate() {
// setup
int every = 1;
dailyEvent = new DailyInterestScheduledEvent(every);
// exercise test
LocalDate nextValidMatchingDate = dailyEvent.findFirstDateOfPeriodForMatchingDate(jan1st);
assertThat(nextValidMatchingDate, is(jan1st));
}
use of org.mifos.accounts.savings.interest.schedule.internal.DailyInterestScheduledEvent in project head by mifos.
the class DailyInterestScheduledEventTest method shouldFindNearestMatchingDateAfterAnyGivenDate.
@Test
public void shouldFindNearestMatchingDateAfterAnyGivenDate() {
// setup
int every = 1;
dailyEvent = new DailyInterestScheduledEvent(every);
// exercise test
LocalDate nextMatchingDate = dailyEvent.nextMatchingDateAfter(jan1st, jan3rd);
assertThat(nextMatchingDate, is(jan4th));
}
Aggregations