Search in sources :

Example 6 with AchIncomeFile

use of edu.cornell.kfs.fp.businessobject.AchIncomeFile in project cu-kfs by CU-CommunityApps.

the class AdvanceDepositServiceImplTest method testValidateMissingGood.

@Test
public void testValidateMissingGood() throws ParseException {
    List<AchIncomeFile> achIncomeFiles = setupAchIncomeFilesGood();
    assertTrue("contents should validate", advanceDepositService.validate(achIncomeFiles));
    assertEquals("expecting no errors", 0, GlobalVariables.getMessageMap().getErrorCount());
    final String regex = ".*Payer Name was not found for transaction amount $12,761\\.79 [ Date: 160223 ].*";
    Pattern p = Pattern.compile(regex, Pattern.DOTALL);
    assertFalse("email message text should NOT indicate payer not found", p.matcher(achIncomeFiles.get(0).getEmailMessageText()).matches());
}
Also used : Pattern(java.util.regex.Pattern) AchIncomeFile(edu.cornell.kfs.fp.businessobject.AchIncomeFile) Test(org.junit.Test)

Aggregations

AchIncomeFile (edu.cornell.kfs.fp.businessobject.AchIncomeFile)6 ArrayList (java.util.ArrayList)5 AchIncomeFileGroup (edu.cornell.kfs.fp.businessobject.AchIncomeFileGroup)2 AchIncomeFileTransactionSet (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionSet)2 List (java.util.List)2 Test (org.junit.Test)2 AchIncomeFileGroupTrailer (edu.cornell.kfs.fp.businessobject.AchIncomeFileGroupTrailer)1 AchIncomeFileTrailer (edu.cornell.kfs.fp.businessobject.AchIncomeFileTrailer)1 AchIncomeFileTransaction (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransaction)1 AchIncomeFileTransactionOpenItemReference (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionOpenItemReference)1 AchIncomeFileTransactionSetTrailer (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionSetTrailer)1 AchIncomeTransaction (edu.cornell.kfs.fp.businessobject.AchIncomeTransaction)1 Date (java.sql.Date)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Pattern (java.util.regex.Pattern)1 AbstractFlatFileObjectSpecification (org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification)1 DelimitedFlatFilePropertySpecification (org.kuali.kfs.sys.batch.DelimitedFlatFilePropertySpecification)1 FlatFileInformation (org.kuali.kfs.sys.batch.FlatFileInformation)1 FlatFilePrefixObjectSpecification (org.kuali.kfs.sys.batch.FlatFilePrefixObjectSpecification)1 FlatFilePropertySpecification (org.kuali.kfs.sys.batch.FlatFilePropertySpecification)1