Search in sources :

Example 11 with PdpFeedFileBaseEntry

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());
}
Also used : PdpFeedFileBaseEntry(edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedFileBaseEntry) Test(org.junit.Test)

Example 12 with PdpFeedFileBaseEntry

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());
}
Also used : PdpFeedFileBaseEntry(edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedFileBaseEntry) Test(org.junit.Test)

Aggregations

PdpFeedFileBaseEntry (edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedFileBaseEntry)12 Test (org.junit.Test)7 KualiDecimal (org.kuali.rice.core.api.util.type.KualiDecimal)2 ConcurRequestExtractRequestDetailFileLine (edu.cornell.kfs.concur.batch.businessobject.ConcurRequestExtractRequestDetailFileLine)1 ConcurStandardAccountingExtractDetailLine (edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine)1 PdpFeedDetailEntry (edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedDetailEntry)1 PdpFeedGroupEntry (edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedGroupEntry)1 ArrayList (java.util.ArrayList)1 Transactional (org.springframework.transaction.annotation.Transactional)1