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