Added a first, simple KMP test for EpcQrCodeGenerator
This commit is contained in:
parent
2c7240f375
commit
46fce04a44
|
@ -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())
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue