Removed UUID
This commit is contained in:
parent
9746e419d1
commit
fa378f6249
|
@ -10,7 +10,7 @@ import net.dankito.banking.fints.response.segments.AccountType
|
|||
import net.dankito.banking.fints.response.segments.ChangeTanMediaParameters
|
||||
import net.dankito.banking.fints.response.segments.JobParameters
|
||||
import net.dankito.utils.multiplatform.Date
|
||||
import net.dankito.utils.multiplatform.UUID
|
||||
import kotlin.random.Random
|
||||
|
||||
|
||||
abstract class FinTsTestBase {
|
||||
|
@ -70,7 +70,7 @@ abstract class FinTsTestBase {
|
|||
}
|
||||
|
||||
protected open fun createDialogId(): String {
|
||||
return UUID.random().replace("-", "")
|
||||
return Random(net.dankito.utils.multiplatform.Date.nanoSecondsSinceEpoch).nextInt(1000000, 9999999).toString()
|
||||
}
|
||||
|
||||
protected open fun convertDate(date: Date): String {
|
||||
|
|
|
@ -74,7 +74,7 @@ class MessageBuilderTest : FinTsTestBase() {
|
|||
|
||||
// then
|
||||
expect(normalizeBinaryData(result)).toBe(normalizeBinaryData(
|
||||
"HNHBK:1:3+000000000117+300+$dialogId+1'" +
|
||||
"HNHBK:1:3+000000000067+300+$dialogId+1'" +
|
||||
"HKEND:2:1+$dialogId'" +
|
||||
"HNHBS:3:1+1'"
|
||||
))
|
||||
|
@ -116,9 +116,9 @@ class MessageBuilderTest : FinTsTestBase() {
|
|||
|
||||
// then
|
||||
expect(normalizeBinaryData(result)).toBe(normalizeBinaryData(
|
||||
"HNHBK:1:3+000000000359+300+$dialogId+1'" +
|
||||
"HNHBK:1:3+000000000309+300+$dialogId+1'" +
|
||||
"HNVSK:998:3+PIN:2+998+1+1::0+1:$Date:$Time+2:2:13:@8@ :5:1+280:$BankCode:$CustomerId:V:0:0+0'" +
|
||||
"HNVSD:999:1+@165@" + "HNSHK:2:4+PIN:2+${SecurityFunction.code}+$ControlReference+1+1+1::0+1+1:$Date:$Time+1:999:1+6:10:16+280:$BankCode:$CustomerId:S:0:0'" +
|
||||
"HNVSD:999:1+@140@" + "HNSHK:2:4+PIN:2+${SecurityFunction.code}+$ControlReference+1+1+1::0+1+1:$Date:$Time+1:999:1+6:10:16+280:$BankCode:$CustomerId:S:0:0'" +
|
||||
"HKEND:3:1+$dialogId'" +
|
||||
"HNSHA:4:2+$ControlReference++$Pin''" +
|
||||
"HNHBS:5:1+1'"
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
package net.dankito.utils.multiplatform
|
||||
|
||||
|
||||
expect class UUID {
|
||||
|
||||
companion object {
|
||||
|
||||
fun random(): String
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
package net.dankito.utils.multiplatform
|
||||
|
||||
import platform.Foundation.NSUUID
|
||||
|
||||
|
||||
actual class UUID {
|
||||
|
||||
actual companion object {
|
||||
|
||||
actual fun random(): String {
|
||||
return NSUUID().UUIDString
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
package net.dankito.utils.multiplatform
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
|
||||
actual class UUID {
|
||||
|
||||
actual companion object {
|
||||
|
||||
actual fun random(): String {
|
||||
return UUID.randomUUID().toString()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue