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)));
}
Aggregations