mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-01 00:18:30 +02:00
Create Nip19Test testing toInt32()
This commit is contained in:
parent
1154f35c77
commit
b6e16ad470
@ -0,0 +1,23 @@
|
||||
package com.vitorpamplona.amethyst.service
|
||||
|
||||
import org.junit.Assert
|
||||
import org.junit.Test
|
||||
|
||||
class Nip19Test {
|
||||
|
||||
@Test(expected = IllegalArgumentException::class)
|
||||
fun to_int_32_length_smaller_than_4() {
|
||||
toInt32(ByteArray(3))
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException::class)
|
||||
fun to_int_32_length_bigger_than_4() {
|
||||
toInt32(ByteArray(5))
|
||||
}
|
||||
|
||||
@Test()
|
||||
fun to_int_32_length_4() {
|
||||
val actual = toInt32(ByteArray(4))
|
||||
Assert.assertEquals(0, actual)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user