From 6a7f8d6780a5be38a1a19540b81074a59f0ab671 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 19 Aug 2024 11:18:35 +0200 Subject: [PATCH] Moved extension methods to fints4k project --- .../kotlin/commands/fints4kCommandLineInterface.kt | 2 +- .../dankito/banking/client/model/AccountTransaction.kt | 2 +- .../net/dankito/banking/fints/FinTsClientDeprecated.kt | 4 ++-- .../kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt | 6 +++--- .../kotlin/net/dankito/banking/fints/RequestExecutor.kt | 2 +- .../banking/fints}/extensions/LocalDateExtensions.kt | 2 +- .../banking/fints}/extensions/LocalDateTimeExtensions.kt | 2 +- .../dankito/banking/fints}/extensions/NumberExtensions.kt | 2 +- .../dankito/banking/fints}/extensions/RandomExtensions.kt | 2 +- .../dankito/banking/fints}/extensions/StringExtensions.kt | 2 +- .../banking/fints}/extensions/ThrowableExtensions.kt | 2 +- .../banking/fints/extensions/TimeZoneExtensions.kt | 7 +++++++ .../net/dankito/banking/fints/log/MessageLogCollector.kt | 6 +++--- .../net/dankito/banking/fints/mapper/FinTsModelMapper.kt | 4 ++-- .../net/dankito/banking/fints/messages/MessageBuilder.kt | 2 +- .../messages/datenelemente/abgeleiteteformate/Datum.kt | 2 +- .../messages/datenelemente/abgeleiteteformate/Uhrzeit.kt | 2 +- .../segmente/implementierte/sepa/SepaMessageCreator.kt | 2 +- .../net/dankito/banking/fints/model/AccountTransaction.kt | 2 +- .../net/dankito/banking/fints/response/ResponseParser.kt | 2 +- .../banking/fints/transactions/mt940/Mt940Parser.kt | 2 +- .../banking/fints/transactions/mt940/model/Balance.kt | 2 +- .../kotlin/net/dankito/banking/fints/util/FinTsUtils.kt | 4 ++-- .../kotlin/net/dankito/banking/fints/FinTsTestBase.kt | 2 +- .../banking/fints/extensions}/NumberExtensionsTest.kt | 2 +- .../banking/fints/extensions}/StringExtensionsTest.kt | 2 +- .../datenelemente/basisformate/TextDatenelementTest.kt | 2 +- .../datenelemente/basisformate/ZiffernDatenelementTest.kt | 2 +- .../datenelemente/implementierte/BPDVersionTest.kt | 2 +- .../implementierte/ProduktbezeichnungTest.kt | 2 +- .../datenelementgruppen/DatenelementgruppeTest.kt | 2 +- .../implementierte/sepa/SepaBankTransferBaseTest.kt | 2 +- .../dankito/banking/fints/response/ResponseParserTest.kt | 8 ++++---- .../fints/{extensions => test}/AssertExtensions.kt | 2 +- .../dankito/banking/fints/transactions/Mt940ParserTest.kt | 2 +- .../kotlin/net/dankito/banking/fints/util/Base64Test.kt | 2 +- .../utils/multiplatform/extensions/TimeZoneExtensions.kt | 7 ------- 37 files changed, 52 insertions(+), 52 deletions(-) rename {multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform => fints4k/src/commonMain/kotlin/net/dankito/banking/fints}/extensions/LocalDateExtensions.kt (91%) rename {multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform => fints4k/src/commonMain/kotlin/net/dankito/banking/fints}/extensions/LocalDateTimeExtensions.kt (87%) rename {multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform => fints4k/src/commonMain/kotlin/net/dankito/banking/fints}/extensions/NumberExtensions.kt (75%) rename {multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform => fints4k/src/commonMain/kotlin/net/dankito/banking/fints}/extensions/RandomExtensions.kt (82%) rename {multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform => fints4k/src/commonMain/kotlin/net/dankito/banking/fints}/extensions/StringExtensions.kt (95%) rename {multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform => fints4k/src/commonMain/kotlin/net/dankito/banking/fints}/extensions/ThrowableExtensions.kt (94%) create mode 100644 fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/TimeZoneExtensions.kt rename {multiplatform-utils/src/commonTest/kotlin/net.dankito.utils.multiplatform.extensions => fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions}/NumberExtensionsTest.kt (94%) rename {multiplatform-utils/src/commonTest/kotlin/net.dankito.utils.multiplatform.extensions => fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions}/StringExtensionsTest.kt (93%) rename fints4k/src/commonTest/kotlin/net/dankito/banking/fints/{extensions => test}/AssertExtensions.kt (97%) delete mode 100644 multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/TimeZoneExtensions.kt diff --git a/SampleApplications/NativeApp/src/nativeMain/kotlin/commands/fints4kCommandLineInterface.kt b/SampleApplications/NativeApp/src/nativeMain/kotlin/commands/fints4kCommandLineInterface.kt index 9dc3c910..4a35520b 100644 --- a/SampleApplications/NativeApp/src/nativeMain/kotlin/commands/fints4kCommandLineInterface.kt +++ b/SampleApplications/NativeApp/src/nativeMain/kotlin/commands/fints4kCommandLineInterface.kt @@ -13,7 +13,7 @@ import kotlinx.datetime.minus import net.dankito.banking.client.model.parameter.GetAccountDataParameter import net.dankito.banking.client.model.parameter.RetrieveTransactions import net.dankito.banking.fints.model.TanMethodType -import net.dankito.utils.multiplatform.extensions.todayAtEuropeBerlin +import net.dankito.banking.fints.extensions.todayAtEuropeBerlin import util.OutputFormat diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/AccountTransaction.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/AccountTransaction.kt index a61891f6..27ab2b62 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/AccountTransaction.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/AccountTransaction.kt @@ -4,7 +4,7 @@ import kotlinx.datetime.LocalDate import kotlinx.serialization.Serializable import net.dankito.banking.fints.model.Amount import net.dankito.banking.fints.model.Money -import net.dankito.utils.multiplatform.extensions.UnixEpochStart +import net.dankito.banking.fints.extensions.UnixEpochStart @Serializable diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientDeprecated.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientDeprecated.kt index 04978b94..9c1aeb2c 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientDeprecated.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientDeprecated.kt @@ -4,8 +4,8 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import kotlinx.datetime.* import net.dankito.banking.fints.callback.FinTsClientCallback -import net.dankito.utils.multiplatform.extensions.minusDays -import net.dankito.utils.multiplatform.extensions.todayAtEuropeBerlin +import net.dankito.banking.fints.extensions.minusDays +import net.dankito.banking.fints.extensions.todayAtEuropeBerlin import net.dankito.banking.fints.messages.datenelemente.implementierte.tan.* import net.dankito.banking.fints.model.* import net.dankito.banking.fints.response.BankResponse diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt index 616c478e..cb41524a 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt @@ -18,9 +18,9 @@ import net.dankito.banking.fints.response.segments.* import net.dankito.banking.fints.tan.FlickerCodeDecoder import net.dankito.banking.fints.tan.TanImageDecoder import net.dankito.banking.fints.util.TanMethodSelector -import net.dankito.utils.multiplatform.extensions.minusDays -import net.dankito.utils.multiplatform.extensions.todayAtEuropeBerlin -import net.dankito.utils.multiplatform.extensions.todayAtSystemDefaultTimeZone +import net.dankito.banking.fints.extensions.minusDays +import net.dankito.banking.fints.extensions.todayAtEuropeBerlin +import net.dankito.banking.fints.extensions.todayAtSystemDefaultTimeZone /** diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/RequestExecutor.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/RequestExecutor.kt index 186d4d5b..dbd2b4a1 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/RequestExecutor.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/RequestExecutor.kt @@ -11,7 +11,7 @@ import net.dankito.banking.fints.util.PureKotlinBase64Service import net.dankito.banking.fints.webclient.IWebClient import net.dankito.banking.fints.webclient.KtorWebClient import net.dankito.banking.fints.webclient.WebClientResponse -import net.dankito.utils.multiplatform.extensions.getAllExceptionMessagesJoined +import net.dankito.banking.fints.extensions.getAllExceptionMessagesJoined open class RequestExecutor( diff --git a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/LocalDateExtensions.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/LocalDateExtensions.kt similarity index 91% rename from multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/LocalDateExtensions.kt rename to fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/LocalDateExtensions.kt index 5bfd5b6a..ccdfc73a 100644 --- a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/LocalDateExtensions.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/LocalDateExtensions.kt @@ -1,4 +1,4 @@ -package net.dankito.utils.multiplatform.extensions +package net.dankito.banking.fints.extensions import kotlinx.datetime.* import kotlin.js.JsName diff --git a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/LocalDateTimeExtensions.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/LocalDateTimeExtensions.kt similarity index 87% rename from multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/LocalDateTimeExtensions.kt rename to fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/LocalDateTimeExtensions.kt index 97b90f7e..51500e90 100644 --- a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/LocalDateTimeExtensions.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/LocalDateTimeExtensions.kt @@ -1,4 +1,4 @@ -package net.dankito.utils.multiplatform.extensions +package net.dankito.banking.fints.extensions import kotlinx.datetime.* diff --git a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/NumberExtensions.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/NumberExtensions.kt similarity index 75% rename from multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/NumberExtensions.kt rename to fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/NumberExtensions.kt index a2641032..53f8ec49 100644 --- a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/NumberExtensions.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/NumberExtensions.kt @@ -1,4 +1,4 @@ -package net.dankito.utils.multiplatform.extensions +package net.dankito.banking.fints.extensions fun Int.toStringWithMinDigits(minimumCountDigits: Int, fillerString: Char = '0'): String { diff --git a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/RandomExtensions.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/RandomExtensions.kt similarity index 82% rename from multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/RandomExtensions.kt rename to fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/RandomExtensions.kt index 599b5f78..486d2c85 100644 --- a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/RandomExtensions.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/RandomExtensions.kt @@ -1,4 +1,4 @@ -package net.dankito.utils.multiplatform.extensions +package net.dankito.banking.fints.extensions import kotlinx.datetime.Clock import kotlin.random.Random diff --git a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/StringExtensions.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/StringExtensions.kt similarity index 95% rename from multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/StringExtensions.kt rename to fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/StringExtensions.kt index 21451930..86822f49 100644 --- a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/StringExtensions.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/StringExtensions.kt @@ -1,4 +1,4 @@ -package net.dankito.utils.multiplatform.extensions +package net.dankito.banking.fints.extensions /** diff --git a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/ThrowableExtensions.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/ThrowableExtensions.kt similarity index 94% rename from multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/ThrowableExtensions.kt rename to fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/ThrowableExtensions.kt index 6af358ca..81fd4aa1 100644 --- a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/ThrowableExtensions.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/ThrowableExtensions.kt @@ -1,4 +1,4 @@ -package net.dankito.utils.multiplatform.extensions +package net.dankito.banking.fints.extensions fun Throwable.getAllExceptionMessagesJoined(maxDepth: Int = 5): String { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/TimeZoneExtensions.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/TimeZoneExtensions.kt new file mode 100644 index 00000000..2feda784 --- /dev/null +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/extensions/TimeZoneExtensions.kt @@ -0,0 +1,7 @@ +package net.dankito.banking.fints.extensions + +import kotlinx.datetime.TimeZone + + +val TimeZone.Companion.europeBerlin: TimeZone + get() = TimeZone.of("Europe/Berlin") \ No newline at end of file diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageLogCollector.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageLogCollector.kt index 0f809da3..a53ad43c 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageLogCollector.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/log/MessageLogCollector.kt @@ -6,9 +6,9 @@ import net.codinux.log.logger import net.dankito.banking.fints.model.BankData import net.dankito.banking.fints.model.MessageLogEntry import net.dankito.banking.fints.model.MessageLogEntryType -import net.dankito.utils.multiplatform.extensions.getInnerException -import net.dankito.utils.multiplatform.extensions.nthIndexOf -import net.dankito.utils.multiplatform.extensions.toStringWithMinDigits +import net.dankito.banking.fints.extensions.getInnerException +import net.dankito.banking.fints.extensions.nthIndexOf +import net.dankito.banking.fints.extensions.toStringWithMinDigits import kotlin.reflect.KClass diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/mapper/FinTsModelMapper.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/mapper/FinTsModelMapper.kt index db988f11..d6508cea 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/mapper/FinTsModelMapper.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/mapper/FinTsModelMapper.kt @@ -13,8 +13,8 @@ import net.dankito.banking.fints.response.client.FinTsClientResponse import net.dankito.banking.fints.response.client.GetAccountTransactionsResponse import net.dankito.banking.fints.response.segments.AccountType import net.dankito.banking.fints.util.BicFinder -import net.dankito.utils.multiplatform.extensions.minusDays -import net.dankito.utils.multiplatform.extensions.todayAtEuropeBerlin +import net.dankito.banking.fints.extensions.minusDays +import net.dankito.banking.fints.extensions.todayAtEuropeBerlin open class FinTsModelMapper { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/MessageBuilder.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/MessageBuilder.kt index f80dcb7c..a3da1384 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/MessageBuilder.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/MessageBuilder.kt @@ -1,6 +1,6 @@ package net.dankito.banking.fints.messages -import net.dankito.utils.multiplatform.extensions.randomWithSeed +import net.dankito.banking.fints.extensions.randomWithSeed import net.dankito.banking.fints.messages.datenelemente.implementierte.Aufsetzpunkt import net.dankito.banking.fints.messages.datenelemente.implementierte.KundensystemID import net.dankito.banking.fints.messages.datenelemente.implementierte.Synchronisierungsmodus diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/datenelemente/abgeleiteteformate/Datum.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/datenelemente/abgeleiteteformate/Datum.kt index 83a6d284..e294622f 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/datenelemente/abgeleiteteformate/Datum.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/datenelemente/abgeleiteteformate/Datum.kt @@ -2,9 +2,9 @@ package net.dankito.banking.fints.messages.datenelemente.abgeleiteteformate import kotlinx.datetime.LocalDate import net.codinux.log.logger +import net.dankito.banking.fints.extensions.toStringWithMinDigits import net.dankito.banking.fints.messages.Existenzstatus import net.dankito.banking.fints.messages.datenelemente.basisformate.NumerischesDatenelement -import net.dankito.utils.multiplatform.extensions.toStringWithMinDigits /** diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/datenelemente/abgeleiteteformate/Uhrzeit.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/datenelemente/abgeleiteteformate/Uhrzeit.kt index 14c5d1eb..23f6457c 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/datenelemente/abgeleiteteformate/Uhrzeit.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/datenelemente/abgeleiteteformate/Uhrzeit.kt @@ -2,9 +2,9 @@ package net.dankito.banking.fints.messages.datenelemente.abgeleiteteformate import kotlinx.datetime.LocalTime import net.codinux.log.logger +import net.dankito.banking.fints.extensions.toStringWithMinDigits import net.dankito.banking.fints.messages.Existenzstatus import net.dankito.banking.fints.messages.datenelemente.basisformate.ZiffernDatenelement -import net.dankito.utils.multiplatform.extensions.toStringWithMinDigits /** diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt index 84145d6b..7c91435d 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt @@ -1,7 +1,7 @@ package net.dankito.banking.fints.messages.segmente.implementierte.sepa import kotlinx.datetime.LocalDateTime -import net.dankito.utils.multiplatform.extensions.nowAtUtc +import net.dankito.banking.fints.extensions.nowAtUtc /** diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountTransaction.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountTransaction.kt index 00980fc9..69d1b744 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountTransaction.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountTransaction.kt @@ -1,7 +1,7 @@ package net.dankito.banking.fints.model import kotlinx.datetime.LocalDate -import net.dankito.utils.multiplatform.extensions.UnixEpochStart +import net.dankito.banking.fints.extensions.UnixEpochStart open class AccountTransaction( diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt index eb0b78ba..c64bb4db 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt @@ -25,7 +25,7 @@ import net.dankito.banking.fints.model.CreditCardTransaction import net.dankito.banking.fints.model.Money import net.dankito.banking.fints.response.segments.* import net.dankito.banking.fints.util.MessageUtils -import net.dankito.utils.multiplatform.extensions.getAllExceptionMessagesJoined +import net.dankito.banking.fints.extensions.getAllExceptionMessagesJoined open class ResponseParser( diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt index 83ea4820..4fb6a008 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt @@ -3,7 +3,7 @@ package net.dankito.banking.fints.transactions.mt940 import kotlinx.datetime.LocalDate import kotlinx.datetime.Month import net.codinux.log.logger -import net.dankito.utils.multiplatform.extensions.todayAtEuropeBerlin +import net.dankito.banking.fints.extensions.todayAtEuropeBerlin import net.dankito.banking.fints.log.IMessageLogAppender import net.dankito.banking.fints.model.Amount import net.dankito.banking.fints.transactions.mt940.model.* diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/model/Balance.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/model/Balance.kt index ad48605a..cf614c9c 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/model/Balance.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/model/Balance.kt @@ -2,7 +2,7 @@ package net.dankito.banking.fints.transactions.mt940.model import kotlinx.datetime.LocalDate import net.dankito.banking.fints.model.Amount -import net.dankito.utils.multiplatform.extensions.UnixEpochStart +import net.dankito.banking.fints.extensions.UnixEpochStart open class Balance( diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/FinTsUtils.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/FinTsUtils.kt index 56e4f26f..47a11f0e 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/FinTsUtils.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/FinTsUtils.kt @@ -3,8 +3,8 @@ package net.dankito.banking.fints.util import kotlinx.datetime.LocalDate import kotlinx.datetime.LocalDateTime import kotlinx.datetime.LocalTime -import net.dankito.utils.multiplatform.extensions.nowAtEuropeBerlin -import net.dankito.utils.multiplatform.extensions.todayAtEuropeBerlin +import net.dankito.banking.fints.extensions.nowAtEuropeBerlin +import net.dankito.banking.fints.extensions.todayAtEuropeBerlin import net.dankito.banking.fints.messages.datenelemente.abgeleiteteformate.Datum import net.dankito.banking.fints.messages.datenelemente.abgeleiteteformate.Uhrzeit diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/FinTsTestBase.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/FinTsTestBase.kt index 45e6ed67..c00fb4c7 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/FinTsTestBase.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/FinTsTestBase.kt @@ -2,7 +2,7 @@ package net.dankito.banking.fints import kotlinx.datetime.LocalDate import net.dankito.banking.fints.callback.SimpleFinTsClientCallback -import net.dankito.utils.multiplatform.extensions.randomWithSeed +import net.dankito.banking.fints.extensions.randomWithSeed import net.dankito.banking.fints.messages.datenelemente.abgeleiteteformate.Datum import net.dankito.banking.fints.messages.datenelemente.abgeleiteteformate.Laenderkennzeichen import net.dankito.banking.fints.messages.datenelemente.implementierte.Dialogsprache diff --git a/multiplatform-utils/src/commonTest/kotlin/net.dankito.utils.multiplatform.extensions/NumberExtensionsTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions/NumberExtensionsTest.kt similarity index 94% rename from multiplatform-utils/src/commonTest/kotlin/net.dankito.utils.multiplatform.extensions/NumberExtensionsTest.kt rename to fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions/NumberExtensionsTest.kt index a9d3cf18..6087a488 100644 --- a/multiplatform-utils/src/commonTest/kotlin/net.dankito.utils.multiplatform.extensions/NumberExtensionsTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions/NumberExtensionsTest.kt @@ -1,4 +1,4 @@ -package net.dankito.utils.multiplatform.extensions +package net.dankito.banking.fints.extensions import kotlin.test.Test import kotlin.test.assertEquals diff --git a/multiplatform-utils/src/commonTest/kotlin/net.dankito.utils.multiplatform.extensions/StringExtensionsTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions/StringExtensionsTest.kt similarity index 93% rename from multiplatform-utils/src/commonTest/kotlin/net.dankito.utils.multiplatform.extensions/StringExtensionsTest.kt rename to fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions/StringExtensionsTest.kt index acc5488c..1c894fbb 100644 --- a/multiplatform-utils/src/commonTest/kotlin/net.dankito.utils.multiplatform.extensions/StringExtensionsTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions/StringExtensionsTest.kt @@ -1,4 +1,4 @@ -package net.dankito.utils.multiplatform.extensions +package net.dankito.banking.fints.extensions import kotlin.test.Test import kotlin.test.assertEquals diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/basisformate/TextDatenelementTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/basisformate/TextDatenelementTest.kt index ead503ae..c70439ee 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/basisformate/TextDatenelementTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/basisformate/TextDatenelementTest.kt @@ -1,6 +1,6 @@ package net.dankito.banking.fints.messages.datenelemente.basisformate -import net.dankito.banking.fints.extensions.assertThrows +import net.dankito.banking.fints.test.assertThrows import net.dankito.banking.fints.messages.Existenzstatus import net.dankito.banking.fints.messages.datenelementgruppen.implementierte.signatur.SicherheitsidentifikationDetails import kotlin.test.Test diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/basisformate/ZiffernDatenelementTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/basisformate/ZiffernDatenelementTest.kt index 836d6335..1615dcc4 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/basisformate/ZiffernDatenelementTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/basisformate/ZiffernDatenelementTest.kt @@ -1,6 +1,6 @@ package net.dankito.banking.fints.messages.datenelemente.basisformate -import net.dankito.banking.fints.extensions.assertThrows +import net.dankito.banking.fints.test.assertThrows import net.dankito.banking.fints.messages.Existenzstatus import kotlin.test.Test import kotlin.test.assertEquals diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/implementierte/BPDVersionTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/implementierte/BPDVersionTest.kt index 021ff84f..79f7e102 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/implementierte/BPDVersionTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/implementierte/BPDVersionTest.kt @@ -1,6 +1,6 @@ package net.dankito.banking.fints.messages.datenelemente.implementierte -import net.dankito.banking.fints.extensions.assertThrows +import net.dankito.banking.fints.test.assertThrows import net.dankito.banking.fints.messages.Existenzstatus import kotlin.test.Test import kotlin.test.assertEquals diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/implementierte/ProduktbezeichnungTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/implementierte/ProduktbezeichnungTest.kt index d27c8ec2..6799f7b2 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/implementierte/ProduktbezeichnungTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelemente/implementierte/ProduktbezeichnungTest.kt @@ -1,6 +1,6 @@ package net.dankito.banking.fints.messages.datenelemente.implementierte -import net.dankito.banking.fints.extensions.assertThrows +import net.dankito.banking.fints.test.assertThrows import net.dankito.banking.fints.messages.Existenzstatus import kotlin.test.Test diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelementgruppen/DatenelementgruppeTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelementgruppen/DatenelementgruppeTest.kt index 8b03a124..027375c9 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelementgruppen/DatenelementgruppeTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/datenelementgruppen/DatenelementgruppeTest.kt @@ -1,6 +1,6 @@ package net.dankito.banking.fints.messages.datenelementgruppen -import net.dankito.banking.fints.extensions.assertEmpty +import net.dankito.banking.fints.test.assertEmpty import net.dankito.banking.fints.messages.Separators import net.dankito.banking.fints.messages.datenelementgruppen.implementierte.signatur.BenutzerdefinierteSignatur import kotlin.test.Test diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaBankTransferBaseTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaBankTransferBaseTest.kt index 012e030b..9bcb19a2 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaBankTransferBaseTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaBankTransferBaseTest.kt @@ -1,6 +1,6 @@ package net.dankito.banking.fints.messages.segmente.implementierte.sepa -import net.dankito.banking.fints.extensions.assertContains +import net.dankito.banking.fints.test.assertContains import net.dankito.banking.fints.messages.segmente.id.CustomerSegmentId import net.dankito.banking.fints.model.* import kotlin.test.Test diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/response/ResponseParserTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/response/ResponseParserTest.kt index a702edd5..00bc3849 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/response/ResponseParserTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/response/ResponseParserTest.kt @@ -12,10 +12,10 @@ import net.dankito.banking.fints.messages.segmente.id.ISegmentId import net.dankito.banking.fints.messages.segmente.id.MessageSegmentId import net.dankito.banking.fints.response.segments.* import kotlinx.datetime.LocalDate -import net.dankito.banking.fints.extensions.assertContains -import net.dankito.banking.fints.extensions.assertContainsExactly -import net.dankito.banking.fints.extensions.assertEmpty -import net.dankito.banking.fints.extensions.assertSize +import net.dankito.banking.fints.test.assertContains +import net.dankito.banking.fints.test.assertContainsExactly +import net.dankito.banking.fints.test.assertEmpty +import net.dankito.banking.fints.test.assertSize import net.dankito.banking.fints.model.Amount import kotlin.test.* diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions/AssertExtensions.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/test/AssertExtensions.kt similarity index 97% rename from fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions/AssertExtensions.kt rename to fints4k/src/commonTest/kotlin/net/dankito/banking/fints/test/AssertExtensions.kt index 6fd71ee3..5ac4a804 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/extensions/AssertExtensions.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/test/AssertExtensions.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.extensions +package net.dankito.banking.fints.test import kotlin.contracts.ExperimentalContracts import kotlin.contracts.contract diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/transactions/Mt940ParserTest.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/transactions/Mt940ParserTest.kt index 202d1b02..d32769d8 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/transactions/Mt940ParserTest.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/transactions/Mt940ParserTest.kt @@ -8,7 +8,7 @@ import net.dankito.banking.fints.transactions.mt940.model.StatementLine import kotlinx.datetime.LocalDate import net.dankito.banking.fints.extensions.* import net.dankito.banking.fints.model.Amount -import net.dankito.utils.multiplatform.extensions.toStringWithMinDigits +import net.dankito.banking.fints.test.* import kotlin.test.Test import kotlin.test.assertContains diff --git a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/util/Base64Test.kt b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/util/Base64Test.kt index 56edcc2e..16a4cddc 100644 --- a/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/util/Base64Test.kt +++ b/fints4k/src/commonTest/kotlin/net/dankito/banking/fints/util/Base64Test.kt @@ -1,6 +1,6 @@ package net.dankito.banking.fints.util -import net.dankito.utils.multiplatform.extensions.randomWithSeed +import net.dankito.banking.fints.extensions.randomWithSeed import kotlin.random.Random import kotlin.test.Test import kotlin.test.assertEquals diff --git a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/TimeZoneExtensions.kt b/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/TimeZoneExtensions.kt deleted file mode 100644 index a10bf6fe..00000000 --- a/multiplatform-utils/src/commonMain/kotlin/net/dankito/utils/multiplatform/extensions/TimeZoneExtensions.kt +++ /dev/null @@ -1,7 +0,0 @@ -package net.dankito.utils.multiplatform.extensions - -import kotlinx.datetime.TimeZone - - -val TimeZone.Companion.europeBerlin: TimeZone - get() = TimeZone.of("Europe/Berlin") \ No newline at end of file