added JNI test
I am a little excited about this because it will be a great way to test Rust functionality quickly and iterate quickly because we will not have to update and run the full app.
This commit is contained in:
parent
241c646f14
commit
72b594b0d0
|
@ -0,0 +1,23 @@
|
|||
package cash.z.wallet.sdk.jni
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNotNull
|
||||
import org.junit.Test
|
||||
|
||||
class JniConverterTest {
|
||||
|
||||
val converter:JniConverter = JniConverter()
|
||||
|
||||
@Test
|
||||
fun testGetAddress_exists() {
|
||||
assertNotNull(converter.getAddress("dummyseed".toByteArray()))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testGetAddress_valid() {
|
||||
val address = converter.getAddress("dummyseed".toByteArray())
|
||||
val expectedAddress = "ztestsapling1snmqdnfqnc407pvqw7sld8w5zxx6nd0523kvlj4jf39uvxvh7vn0hs3q38n07806dwwecqwke3t"
|
||||
assertEquals("Invalid address", expectedAddress, address)
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue