Search in sources :

Example 6 with AbstractFlatFileObjectSpecification

use of org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification in project cu-kfs by CU-CommunityApps.

the class AchIncomeDelimitedFlatFileSpecificationTest method testParseLineIntoObjectAchIncomeFileTransactionReference.

@Test
public void testParseLineIntoObjectAchIncomeFileTransactionReference() throws Exception {
    AbstractFlatFileObjectSpecification flatFileObjectSpecification = new FlatFilePrefixObjectSpecification();
    List<FlatFilePropertySpecification> parseProperties = new ArrayList<>();
    setFlatFileProperty(parseProperties, 1, "type");
    setFlatFileProperty(parseProperties, 2, "value");
    flatFileObjectSpecification.setParseProperties(parseProperties);
    AchIncomeFileTransactionReference achIncomeFileTransactionReference = new AchIncomeFileTransactionReference();
    achIncomeDelimitedFlatFileSpecification.parseLineIntoObject(flatFileObjectSpecification, REF_LINE, achIncomeFileTransactionReference, 1);
    assertEquals("GC", achIncomeFileTransactionReference.getType());
    assertEquals("W911NF1420001", achIncomeFileTransactionReference.getValue());
}
Also used : FlatFilePrefixObjectSpecification(org.kuali.kfs.sys.batch.FlatFilePrefixObjectSpecification) AchIncomeFileTransactionReference(edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionReference) ArrayList(java.util.ArrayList) FlatFilePropertySpecification(org.kuali.kfs.sys.batch.FlatFilePropertySpecification) DelimitedFlatFilePropertySpecification(org.kuali.kfs.sys.batch.DelimitedFlatFilePropertySpecification) AbstractFlatFileObjectSpecification(org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification) Test(org.junit.Test)

Example 7 with AbstractFlatFileObjectSpecification

use of org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification in project cu-kfs by CU-CommunityApps.

the class AchIncomeDelimitedFlatFileSpecificationTest method parseLineIntoObjectAchIncomeFileTransactionPayerOrPayeeName.

protected void parseLineIntoObjectAchIncomeFileTransactionPayerOrPayeeName(String lineToParse, String expectedType, String expectedValue, String expectedIdQualifier, String expectedIdCode) {
    AbstractFlatFileObjectSpecification flatFileObjectSpecification = new FlatFilePrefixObjectSpecification();
    List<FlatFilePropertySpecification> parseProperties = new ArrayList<>();
    setFlatFileProperty(parseProperties, 1, "type");
    setFlatFileProperty(parseProperties, 2, "name");
    setFlatFileProperty(parseProperties, 3, "idQualifier");
    setFlatFileProperty(parseProperties, 4, "idCode");
    flatFileObjectSpecification.setParseProperties(parseProperties);
    AchIncomeFileTransactionPayerOrPayeeName achIncomeFileTransactionPayerOrPayeeName = new AchIncomeFileTransactionPayerOrPayeeName();
    achIncomeDelimitedFlatFileSpecification.parseLineIntoObject(flatFileObjectSpecification, lineToParse, achIncomeFileTransactionPayerOrPayeeName, 1);
    assertEquals(expectedType, achIncomeFileTransactionPayerOrPayeeName.getType());
    assertEquals(expectedValue, achIncomeFileTransactionPayerOrPayeeName.getName());
    assertEquals(expectedIdQualifier, achIncomeFileTransactionPayerOrPayeeName.getIdQualifier());
    assertEquals(expectedIdCode, achIncomeFileTransactionPayerOrPayeeName.getIdCode());
}
Also used : FlatFilePrefixObjectSpecification(org.kuali.kfs.sys.batch.FlatFilePrefixObjectSpecification) ArrayList(java.util.ArrayList) FlatFilePropertySpecification(org.kuali.kfs.sys.batch.FlatFilePropertySpecification) DelimitedFlatFilePropertySpecification(org.kuali.kfs.sys.batch.DelimitedFlatFilePropertySpecification) AbstractFlatFileObjectSpecification(org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification) AchIncomeFileTransactionPayerOrPayeeName(edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionPayerOrPayeeName)

Example 8 with AbstractFlatFileObjectSpecification

use of org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification in project cu-kfs by CU-CommunityApps.

the class AchIncomeDelimitedFlatFileSpecificationTest method testParseLineIntoObjectAchIncomeFile.

@Test
public void testParseLineIntoObjectAchIncomeFile() throws Exception {
    AbstractFlatFileObjectSpecification flatFileObjectSpecification = new FlatFilePrefixObjectSpecification();
    List<FlatFilePropertySpecification> parseProperties = new ArrayList<>();
    setFlatFileProperty(parseProperties, 9, "fileDate");
    setFlatFileProperty(parseProperties, 10, "fileTime");
    setFlatFileProperty(parseProperties, 13, "interchangeControlNumber");
    setFlatFileProperty(parseProperties, 15, "productionOrTestIndicator");
    flatFileObjectSpecification.setParseProperties(parseProperties);
    AchIncomeFile achIncomeFile = new AchIncomeFile();
    achIncomeDelimitedFlatFileSpecification.parseLineIntoObject(flatFileObjectSpecification, ISA_LINE, achIncomeFile, 1);
    assertEquals("160223", achIncomeFile.getFileDate());
    assertEquals("2143", achIncomeFile.getFileTime());
    assertEquals("000000000", achIncomeFile.getInterchangeControlNumber());
    assertEquals("P", achIncomeFile.getProductionOrTestIndicator());
}
Also used : FlatFilePrefixObjectSpecification(org.kuali.kfs.sys.batch.FlatFilePrefixObjectSpecification) ArrayList(java.util.ArrayList) AchIncomeFile(edu.cornell.kfs.fp.businessobject.AchIncomeFile) FlatFilePropertySpecification(org.kuali.kfs.sys.batch.FlatFilePropertySpecification) DelimitedFlatFilePropertySpecification(org.kuali.kfs.sys.batch.DelimitedFlatFilePropertySpecification) AbstractFlatFileObjectSpecification(org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification) Test(org.junit.Test)

Example 9 with AbstractFlatFileObjectSpecification

use of org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification in project cu-kfs by CU-CommunityApps.

the class AchIncomeDelimitedFlatFileSpecificationTest method testParseLineIntoObjectAchIncomeFileTransactionPremiumPayersAdminsContact.

@Test
public void testParseLineIntoObjectAchIncomeFileTransactionPremiumPayersAdminsContact() throws Exception {
    AbstractFlatFileObjectSpecification flatFileObjectSpecification = new FlatFilePrefixObjectSpecification();
    List<FlatFilePropertySpecification> parseProperties = new ArrayList<>();
    setFlatFileProperty(parseProperties, 2, "name");
    flatFileObjectSpecification.setParseProperties(parseProperties);
    AchIncomeFileTransactionPremiumPayersAdminsContact achIncomeFileTransactionPremiumPayersAdminsContact = new AchIncomeFileTransactionPremiumPayersAdminsContact();
    achIncomeDelimitedFlatFileSpecification.parseLineIntoObject(flatFileObjectSpecification, PER_LINE, achIncomeFileTransactionPremiumPayersAdminsContact, 1);
    assertEquals("JOHN SMITH", achIncomeFileTransactionPremiumPayersAdminsContact.getName());
}
Also used : FlatFilePrefixObjectSpecification(org.kuali.kfs.sys.batch.FlatFilePrefixObjectSpecification) ArrayList(java.util.ArrayList) FlatFilePropertySpecification(org.kuali.kfs.sys.batch.FlatFilePropertySpecification) DelimitedFlatFilePropertySpecification(org.kuali.kfs.sys.batch.DelimitedFlatFilePropertySpecification) AchIncomeFileTransactionPremiumPayersAdminsContact(edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionPremiumPayersAdminsContact) AbstractFlatFileObjectSpecification(org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification) Test(org.junit.Test)

Example 10 with AbstractFlatFileObjectSpecification

use of org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification in project cu-kfs by CU-CommunityApps.

the class AchIncomeDelimitedFlatFileSpecificationTest method testParseLineIntoObjectAchIncomeFileTransactionNote.

@Test
public void testParseLineIntoObjectAchIncomeFileTransactionNote() throws Exception {
    AbstractFlatFileObjectSpecification flatFileObjectSpecification = new FlatFilePrefixObjectSpecification();
    List<FlatFilePropertySpecification> parseProperties = new ArrayList<>();
    setFlatFileProperty(parseProperties, 1, "type");
    setFlatFileProperty(parseProperties, 2, "value");
    flatFileObjectSpecification.setParseProperties(parseProperties);
    AchIncomeFileTransactionNote achIncomeFileTransactionNote = new AchIncomeFileTransactionNote();
    achIncomeDelimitedFlatFileSpecification.parseLineIntoObject(flatFileObjectSpecification, NTE_LINE, achIncomeFileTransactionNote, 1);
    assertEquals("001", achIncomeFileTransactionNote.getType());
    assertEquals("TRANSACTION NOTE", achIncomeFileTransactionNote.getValue());
}
Also used : FlatFilePrefixObjectSpecification(org.kuali.kfs.sys.batch.FlatFilePrefixObjectSpecification) AchIncomeFileTransactionNote(edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionNote) ArrayList(java.util.ArrayList) FlatFilePropertySpecification(org.kuali.kfs.sys.batch.FlatFilePropertySpecification) DelimitedFlatFilePropertySpecification(org.kuali.kfs.sys.batch.DelimitedFlatFilePropertySpecification) AbstractFlatFileObjectSpecification(org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)16 AbstractFlatFileObjectSpecification (org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification)16 DelimitedFlatFilePropertySpecification (org.kuali.kfs.sys.batch.DelimitedFlatFilePropertySpecification)16 FlatFilePrefixObjectSpecification (org.kuali.kfs.sys.batch.FlatFilePrefixObjectSpecification)16 FlatFilePropertySpecification (org.kuali.kfs.sys.batch.FlatFilePropertySpecification)16 Test (org.junit.Test)15 KualiDecimal (org.kuali.rice.core.api.util.type.KualiDecimal)3 AchIncomeFileTransaction (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransaction)2 AchIncomeFile (edu.cornell.kfs.fp.businessobject.AchIncomeFile)1 AchIncomeFileGroup (edu.cornell.kfs.fp.businessobject.AchIncomeFileGroup)1 AchIncomeFileGroupTrailer (edu.cornell.kfs.fp.businessobject.AchIncomeFileGroupTrailer)1 AchIncomeFileTrailer (edu.cornell.kfs.fp.businessobject.AchIncomeFileTrailer)1 AchIncomeFileTransactionDateTime (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionDateTime)1 AchIncomeFileTransactionNote (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionNote)1 AchIncomeFileTransactionOpenItemReference (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionOpenItemReference)1 AchIncomeFileTransactionPayerOrPayeeName (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionPayerOrPayeeName)1 AchIncomeFileTransactionPremiumPayersAdminsContact (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionPremiumPayersAdminsContact)1 AchIncomeFileTransactionPremiumReceiverName (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionPremiumReceiverName)1 AchIncomeFileTransactionReference (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionReference)1 AchIncomeFileTransactionSet (edu.cornell.kfs.fp.businessobject.AchIncomeFileTransactionSet)1