Search in sources :

Example 6 with PaymentStatus

use of org.kuali.kfs.pdp.businessobject.PaymentStatus in project cu-kfs by CU-CommunityApps.

the class CuExtractPaymentServiceImplTest method testAchFileHeaderDateIsOneDayAfterProcessDate.

@Test
public void testAchFileHeaderDateIsOneDayAfterProcessDate() {
    cuExtractPaymentServiceImpl.setAchBundlerHelperService(new TestAchBundlerHelperService());
    PaymentStatus extractedStatus = new PaymentStatus();
    Date processDate = new Date(Calendar.getInstance().getTimeInMillis());
    List<String> notificationEmailAddresses = new ArrayList<String>(Arrays.asList(NOTIFICATION_EMAIL_ADDRESSES));
    cuExtractPaymentServiceImpl.writeExtractAchFileMellonBankFastTrack(extractedStatus, ACH_EXTRACT_TEST_PATH_AND_FILE, processDate, yyyyMMddHHmmss_DATE_FORMATTER, notificationEmailAddresses);
    Date expectedHeaderDate = cuExtractPaymentServiceImpl.calculateHeaderDate(processDate);
    assertTrue("ACH Extract Payments File Header Date is not what was expected.", isDateInOutputFileWhereExpected(HEADER_LINE_IN_OUTPUT_FILE, yyyyMMddHHmmss_DATE_FORMATTER.format(expectedHeaderDate)));
    assertTrue("ACH Extract Payments File Payee Date is not what was expected.", isDateInOutputFileWhereExpected(FIRST_PAYEE_LINE_IN_OUTPUT_FILE, yyyyMMdd_DATE_FORMATTER.format(processDate)));
}
Also used : ArrayList(java.util.ArrayList) PaymentStatus(org.kuali.kfs.pdp.businessobject.PaymentStatus) Date(java.util.Date) Test(org.junit.Test)

Aggregations

PaymentStatus (org.kuali.kfs.pdp.businessobject.PaymentStatus)6 Date (java.util.Date)4 Timestamp (java.sql.Timestamp)3 ArrayList (java.util.ArrayList)3 PaymentGroup (org.kuali.kfs.pdp.businessobject.PaymentGroup)3 KualiCode (org.kuali.kfs.krad.bo.KualiCode)2 Bank (org.kuali.kfs.sys.businessobject.Bank)2 CheckReconciliation (com.rsmart.kuali.kfs.cr.businessobject.CheckReconciliation)1 PaymentDetailExtendedAttribute (edu.cornell.kfs.pdp.businessobject.PaymentDetailExtendedAttribute)1 CuFormatPaymentDao (edu.cornell.kfs.pdp.dataaccess.CuFormatPaymentDao)1 ParseException (java.text.ParseException)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Calendar (java.util.Calendar)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Test (org.junit.Test)1 CustomerProfile (org.kuali.kfs.pdp.businessobject.CustomerProfile)1 FormatProcess (org.kuali.kfs.pdp.businessobject.FormatProcess)1 FormatProcessSummary (org.kuali.kfs.pdp.businessobject.FormatProcessSummary)1 PaymentDetail (org.kuali.kfs.pdp.businessobject.PaymentDetail)1