Added a first, simple KMP test for EpcQrCodeGenerator

This commit is contained in:
dankito 2023-04-10 23:20:36 +02:00
parent 2c7240f375
commit 46fce04a44
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
package net.codinux.banking.epcqrcode
import kotlin.test.Test
import kotlin.test.assertEquals
class EpcQrCodeGeneratorTest {
companion object {
private const val ReceiverName = "Liebe"
private const val ReceiverIban = "DE01234567890123456789"
}
private val underTest = EpcQrCodeGenerator()
@Test
fun basicDataOnly() {
val config = EpcQrCodeConfig(ReceiverName, ReceiverIban)
val result = underTest.generateAsString(config)
assertEquals(actual = result, expected = """
BCD
002
1
SCT
Liebe
DE01234567890123456789
CHAR
""".trimIndent())
}
}