Moved pure test code (getBestAccountForRetrievingTransactions()) to tests
This commit is contained in:
parent
1169c510bf
commit
a6cc51801e
|
@ -976,9 +976,4 @@ open class FinTsClient @JvmOverloads constructor(
|
|||
return null
|
||||
}
|
||||
|
||||
|
||||
internal fun getBestAccountForRetrievingTransactions(customer: CustomerData): AccountData? {
|
||||
return customer.accounts.firstOrNull { it.allowedJobNames.contains(CustomerSegmentId.AccountTransactionsMt940.id) }
|
||||
}
|
||||
|
||||
}
|
|
@ -139,7 +139,7 @@ class FinTsClientTest {
|
|||
|
||||
// given
|
||||
underTest.addAccount(Bank, Customer) // retrieve basic data, e.g. accounts
|
||||
val account = underTest.getBestAccountForRetrievingTransactions(Customer)
|
||||
val account = Customer.accounts.firstOrNull { it.allowedJobNames.contains(CustomerSegmentId.AccountTransactionsMt940.id) }
|
||||
assertThat(account).describedAs("We need at least one account that supports retrieving account transactions (${CustomerSegmentId.AccountTransactionsMt940.id})").isNotNull()
|
||||
|
||||
// when
|
||||
|
|
Loading…
Reference in New Issue