use of edu.cornell.kfs.concur.batch.service.impl.ConcurStandardAccountExtractPdpEntryServiceImpl.DebitCreditTotal in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountExtractPdpEntryServiceImplTest method cleanAccountingEntriesInDetailEntry_HandleOneCredit.
@Test
public void cleanAccountingEntriesInDetailEntry_HandleOneCredit() {
PdpFeedDetailEntry detailEntry = PdpFeedDetailEntryFixture.DETAIL_TWO_POSITIVE_1_NEGATIVE.toPdpFeedDetailEntry();
Map<DebitCreditTotal, KualiDecimal> totals = pdpEntryService.calculateTotals(detailEntry);
assertEquals("The number of accounting entries should be 3", 3, detailEntry.getAccounting().size());
assertTotals(totals, 15, -10);
pdpEntryService.cleanAccountingEntriesInDetailEntry(detailEntry);
totals = pdpEntryService.calculateTotals(detailEntry);
assertEquals("The number of accounting entries should be 1", 1, detailEntry.getAccounting().size());
assertTotals(totals, 5, 0);
}
use of edu.cornell.kfs.concur.batch.service.impl.ConcurStandardAccountExtractPdpEntryServiceImpl.DebitCreditTotal in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountExtractPdpEntryServiceImplTest method cleanAccountingEntriesInDetailEntry_HandleTwoCredits.
@Test
public void cleanAccountingEntriesInDetailEntry_HandleTwoCredits() {
PdpFeedDetailEntry detailEntry = PdpFeedDetailEntryFixture.DETAIL_TWO_POSITIVE_2_NEGATIVE.toPdpFeedDetailEntry();
Map<DebitCreditTotal, KualiDecimal> totals = pdpEntryService.calculateTotals(detailEntry);
assertEquals("The number of accounting entries should be 4", 4, detailEntry.getAccounting().size());
assertTotals(totals, 15, -11);
pdpEntryService.cleanAccountingEntriesInDetailEntry(detailEntry);
totals = pdpEntryService.calculateTotals(detailEntry);
assertEquals("The number of accounting entries should be 1", 1, detailEntry.getAccounting().size());
assertTotals(totals, 4, 0);
}
Aggregations