From 160262cdff97c5cf1f051e8016e8f682daf9812e Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 23 May 2020 20:46:43 +0200 Subject: [PATCH] Fixed that Thh:mm:ss(:SSS) is considered as field code --- .../fints/transactions/mt940/Mt940Parser.kt | 3 +- .../fints/transactions/Mt940ParserTest.kt | 55 ++++++++++++++++++- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/fints4k/src/main/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt b/fints4k/src/main/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt index 1c1aed82..b180fcea 100644 --- a/fints4k/src/main/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt +++ b/fints4k/src/main/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt @@ -26,7 +26,8 @@ open class Mt940Parser : IMt940Parser { companion object { val AccountStatementsSeparatorPattern = Regex("^\\s*-\\s*\$", RegexOption.MULTILINE) // a line only with '-' and may other white space characters - val AccountStatementFieldSeparatorPattern = Pattern.compile(":\\d\\d\\w?:") + // (? + assertThat(transaction.information).isNotNull() + + assertThat(transaction.information?.sepaUsage).isNotNull() + + if (transaction.information?.unparsedUsage?.contains("KREF+") == true) { + assertThat(transaction.information?.customerReference).isNotNull() + } + } + } + @Test fun parseTransactions() {