use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedFileBaseEntry in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountExtractPdpEntryServiceImplTest method createPdpFileBaseEntryThatDoesNotContainNonReimbursableSections_TwoTransSumPositive.
@Test
public void createPdpFileBaseEntryThatDoesNotContainNonReimbursableSections_TwoTransSumPositive() {
PdpFeedFileBaseEntry pdpFeedFileBaseEntry = PdpFeedFileBaseEntryFixture.FEED_TWO_TRANS_SUM_TO_POSITIVE.toPdpFeedFileBaseEntry();
assertEquals("Should have 1 group", 1, pdpFeedFileBaseEntry.getGroup().size());
assertEquals("Should have 2 transactions", 2, pdpFeedFileBaseEntry.getGroup().get(0).getDetail().get(0).getAccounting().size());
PdpFeedFileBaseEntry cleaned = pdpEntryService.createPdpFileBaseEntryThatDoesNotContainNonReimbursableSections(pdpFeedFileBaseEntry, reportData);
assertEquals("Should have 1 group", 1, cleaned.getGroup().size());
assertEquals("Should have 1 detail", 1, cleaned.getGroup().get(0).getDetail().size());
assertEquals("Should have 1 transaction", 1, cleaned.getGroup().get(0).getDetail().get(0).getAccounting().size());
}
use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedFileBaseEntry in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountExtractPdpEntryServiceImplTest method createPdpFileBaseEntryThatDoesNotContainNonReimbursableSections_MultipleDetailsZeroTrans.
@Test
public void createPdpFileBaseEntryThatDoesNotContainNonReimbursableSections_MultipleDetailsZeroTrans() {
PdpFeedFileBaseEntry pdpFeedFileBaseEntry = PdpFeedFileBaseEntryFixture.FEED_TWO_DETAILS_ONE_POSITIVE_ONE_ZERO.toPdpFeedFileBaseEntry();
assertEquals("Should have 1 group in original feed file", 1, pdpFeedFileBaseEntry.getGroup().size());
assertEquals("Should have 2 details in original feed file", 2, pdpFeedFileBaseEntry.getGroup().get(0).getDetail().size());
PdpFeedFileBaseEntry cleaned = pdpEntryService.createPdpFileBaseEntryThatDoesNotContainNonReimbursableSections(pdpFeedFileBaseEntry, reportData);
assertEquals("Should have 1 group in cleaned feed file", 1, cleaned.getGroup().size());
assertEquals("Should have 1 detail in cleaned feedfile", 1, cleaned.getGroup().get(0).getDetail().size());
}
Aggregations