From f557c082675a74c37a903aa95901e01b54f4841f Mon Sep 17 00:00:00 2001 From: dankl Date: Mon, 21 Oct 2019 00:56:44 +0200 Subject: [PATCH] Made BIC non-null --- .../main/kotlin/net/dankito/fints/messages/MessageBuilder.kt | 2 +- .../src/main/kotlin/net/dankito/fints/model/BankData.kt | 2 +- .../src/test/kotlin/net/dankito/fints/FinTsClientTest.kt | 4 ++-- .../src/test/kotlin/net/dankito/fints/FinTsTestBase.kt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt index 6088e36b..00c2a6af 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt @@ -139,7 +139,7 @@ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = Seg getSepaUrnFor(CustomerSegmentId.SepaAccountInfoParameters, customer, "pain.001.001.03")?.let { urn -> return MessageBuilderResult(createSignedMessage(bank, customer, dialogData, listOf( - SepaEinzelueberweisung(generator.resetSegmentNumber(2), urn, customer, bank.bic!!, bankTransferData), // TODO: get rid of '!!' + SepaEinzelueberweisung(generator.resetSegmentNumber(2), urn, customer, bank.bic, bankTransferData), ZweiSchrittTanEinreichung(generator.getNextSegmentNumber(), TanProcess.TanProcess4, CustomerSegmentId.SepaBankTransfer) ))) } diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/model/BankData.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/model/BankData.kt index a1d393fc..df61ed5b 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/model/BankData.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/model/BankData.kt @@ -10,9 +10,9 @@ open class BankData( var bankCode: String, var countryCode: Int, var finTs3ServerAddress: String, + var bic: String, var bpdVersion: Int = BPDVersion.VersionNotReceivedYet, var name: String = "", - var bic: String? = null, /** * Maximale Anzahl an Geschäftsvorfallsarten, die pro Nachricht zulässig ist. diff --git a/fints4javaLib/src/test/kotlin/net/dankito/fints/FinTsClientTest.kt b/fints4javaLib/src/test/kotlin/net/dankito/fints/FinTsClientTest.kt index 162e0620..d2517bef 100644 --- a/fints4javaLib/src/test/kotlin/net/dankito/fints/FinTsClientTest.kt +++ b/fints4javaLib/src/test/kotlin/net/dankito/fints/FinTsClientTest.kt @@ -50,7 +50,7 @@ class FinTsClientTest { } - private val BankDataAnonymous = BankData("10070000", Laenderkennzeichen.Germany, "https://fints.deutsche-bank.de/") + private val BankDataAnonymous = BankData("10070000", Laenderkennzeichen.Germany, "https://fints.deutsche-bank.de/", "DEUTDEBBXXX") // TODO: add your settings here: private val bankInfo = BankFinder().findBankByBankCode("").first() @@ -142,7 +142,7 @@ class FinTsClientTest { assertThat(Customer.iban).describedAs("Customer's IBAN should now be set").isNotNull() // transfer 1 cent to yourself. Transferring money to oneself also doesn't require to enter a TAN according to PSD2 - val BankTransferData = BankTransferData(Customer.name, Customer.iban!!, Bank.bic!!, 0.01.toBigDecimal(), "Give it to me baby") + val BankTransferData = BankTransferData(Customer.name, Customer.iban!!, Bank.bic, 0.01.toBigDecimal(), "Give it to me baby") // when diff --git a/fints4javaLib/src/test/kotlin/net/dankito/fints/FinTsTestBase.kt b/fints4javaLib/src/test/kotlin/net/dankito/fints/FinTsTestBase.kt index 321ca6d0..2be12140 100644 --- a/fints4javaLib/src/test/kotlin/net/dankito/fints/FinTsTestBase.kt +++ b/fints4javaLib/src/test/kotlin/net/dankito/fints/FinTsTestBase.kt @@ -18,7 +18,7 @@ abstract class FinTsTestBase { const val BankFinTsServerAddress = "banking.supi-dupi-bank.de/fints30" - val Bank = BankData(BankCode, BankCountryCode, "") + val Bank = BankData(BankCode, BankCountryCode, "", "") const val CustomerId = "0987654321"