use of de.metas.banking.payment.impl.BankStatementPaymentBL in project metasfresh-webui-api by metasfresh.
the class ReconcilePaymentsCommandTest method beforeEach.
@BeforeEach
public void beforeEach() {
AdempiereTestHelper.get().init();
final CurrencyRepository currencyRepository = new CurrencyRepository();
final MoneyService moneyService = new MoneyService(currencyRepository);
SpringContextHolder.registerJUnitBean(moneyService);
final IBankStatementListenerService bankStatementListenerService = Services.get(IBankStatementListenerService.class);
final ESRImportBL esrImportBL = new ESRImportBL(AttachmentEntryService.createInstanceForUnitTesting());
bankStatementListenerService.addListener(new ESRBankStatementListener(esrImportBL));
final IPaySelectionBL paySelectionBL = Services.get(IPaySelectionBL.class);
bankStatementListenerService.addListener(new PaySelectionBankStatementListener(paySelectionBL));
Services.registerService(IBankStatementBL.class, new BankStatementBL() {
public void unpost(I_C_BankStatement bankStatement) {
System.out.println("In JUnit test BankStatementBL.unpost() does nothing" + "\n\t bank statement: " + bankStatement + "\n\t called via " + Trace.toOneLineStackTraceString());
}
});
bankStatmentPaymentBL = new BankStatementPaymentBL(moneyService);
SpringContextHolder.registerJUnitBean(IBankStatementPaymentBL.class, bankStatmentPaymentBL);
this.rowsRepo = new BankStatementLineAndPaymentsToReconcileRepository(currencyRepository);
rowsRepo.setBpartnerLookup(new MockedBPartnerLookupDataSource());
createMasterdata();
}
Aggregations