Search in sources :

Example 1 with CheckCurrenciesAction

use of name.abuchen.portfolio.datatransfer.actions.CheckCurrenciesAction in project portfolio by buchen.

the class ConsorsbankPDFExtractorTest method checkCurrency.

private void checkCurrency(final String accountCurrency, AccountTransaction transaction) {
    Account account = new Account();
    account.setCurrencyCode(accountCurrency);
    Status status = new CheckCurrenciesAction().process(transaction, account);
    assertThat(status.getCode(), is(Code.OK));
}
Also used : Status(name.abuchen.portfolio.datatransfer.ImportAction.Status) Account(name.abuchen.portfolio.model.Account) CheckCurrenciesAction(name.abuchen.portfolio.datatransfer.actions.CheckCurrenciesAction)

Example 2 with CheckCurrenciesAction

use of name.abuchen.portfolio.datatransfer.actions.CheckCurrenciesAction in project portfolio by buchen.

the class ReviewExtractedItemsPage method checkEntries.

private void checkEntries(List<ExtractedEntry> entries) {
    List<ImportAction> actions = new ArrayList<>();
    actions.add(new CheckValidTypesAction());
    actions.add(new DetectDuplicatesAction());
    actions.add(new CheckCurrenciesAction());
    for (ExtractedEntry entry : entries) {
        entry.clearStatus();
        for (ImportAction action : actions) entry.addStatus(entry.getItem().apply(action, this));
    }
}
Also used : CheckValidTypesAction(name.abuchen.portfolio.datatransfer.actions.CheckValidTypesAction) DetectDuplicatesAction(name.abuchen.portfolio.datatransfer.actions.DetectDuplicatesAction) ImportAction(name.abuchen.portfolio.datatransfer.ImportAction) ArrayList(java.util.ArrayList) CheckCurrenciesAction(name.abuchen.portfolio.datatransfer.actions.CheckCurrenciesAction)

Aggregations

CheckCurrenciesAction (name.abuchen.portfolio.datatransfer.actions.CheckCurrenciesAction)2 ArrayList (java.util.ArrayList)1 ImportAction (name.abuchen.portfolio.datatransfer.ImportAction)1 Status (name.abuchen.portfolio.datatransfer.ImportAction.Status)1 CheckValidTypesAction (name.abuchen.portfolio.datatransfer.actions.CheckValidTypesAction)1 DetectDuplicatesAction (name.abuchen.portfolio.datatransfer.actions.DetectDuplicatesAction)1 Account (name.abuchen.portfolio.model.Account)1