From a6cc51801e4e73d6b41e531b217b32cf88717782 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 13 May 2020 00:06:24 +0200 Subject: [PATCH] Moved pure test code (getBestAccountForRetrievingTransactions()) to tests --- fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt | 5 ----- fints4k/src/test/kotlin/net/dankito/fints/FinTsClientTest.kt | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt b/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt index 6cc4649b..e92f477a 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt @@ -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) } - } - } \ No newline at end of file diff --git a/fints4k/src/test/kotlin/net/dankito/fints/FinTsClientTest.kt b/fints4k/src/test/kotlin/net/dankito/fints/FinTsClientTest.kt index 1aac86a8..063653a3 100644 --- a/fints4k/src/test/kotlin/net/dankito/fints/FinTsClientTest.kt +++ b/fints4k/src/test/kotlin/net/dankito/fints/FinTsClientTest.kt @@ -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