use of org.kuali.kfs.sys.batch.AbstractFlatFileObjectSpecification in project cu-kfs by CU-CommunityApps.
the class AchIncomeDelimitedFlatFileSpecificationTest method testParseLineIntoObjectAchIncomeFileTransaction.
@Test
public void testParseLineIntoObjectAchIncomeFileTransaction() throws Exception {
AbstractFlatFileObjectSpecification flatFileObjectSpecification = new FlatFilePrefixObjectSpecification();
List<FlatFilePropertySpecification> parseProperties = new ArrayList<>();
setFlatFileProperty(parseProperties, 2, "transactionAmount", KualiDecimalFormatter.class);
setFlatFileProperty(parseProperties, 3, "creditDebitIndicator");
setFlatFileProperty(parseProperties, 4, "paymentMethodCode");
setFlatFileProperty(parseProperties, 16, "effectiveDate");
setFlatFileProperty(parseProperties, 10, "companyId");
flatFileObjectSpecification.setParseProperties(parseProperties);
AchIncomeFileTransaction achIncomeFileTransaction = new AchIncomeFileTransaction();
achIncomeDelimitedFlatFileSpecification.parseLineIntoObject(flatFileObjectSpecification, BPR_LINE1, achIncomeFileTransaction, 1);
assertEquals(new KualiDecimal("12761.79"), achIncomeFileTransaction.getTransactionAmount());
assertEquals("C", achIncomeFileTransaction.getCreditDebitIndicator());
assertEquals("ACH", achIncomeFileTransaction.getPaymentMethodCode());
assertEquals(null, achIncomeFileTransaction.getEffectiveDate());
assertEquals("1111541330", achIncomeFileTransaction.getCompanyId());
}
Aggregations