libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 60b65886f825057a74e208de9a345c61115c128d
parent 9f9c5878df52ad3c12d5743218685d896ee80294
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Thu, 17 Oct 2019 16:08:14 +0200

introducing nullable references

Diffstat:
Asandbox/src/test/kotlin/DbTest.kt | 36++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+), 0 deletions(-)

diff --git a/sandbox/src/test/kotlin/DbTest.kt b/sandbox/src/test/kotlin/DbTest.kt @@ -0,0 +1,35 @@ +package tech.libeufin.sandbox + +import org.jetbrains.exposed.dao.EntityID +import org.jetbrains.exposed.sql.transactions.transaction +import org.junit.BeforeClass +import org.junit.Test +import org.junit.Before + +class DbTest { + + @Before + fun setUp() { + dbCreateTables() + } + + /** + * This function creates a EBICS subscriber _first_, and + * subsequently tries to insert a mock bianry value into + * the keys columns of the subscriber. + */ + @Test + fun storeBinary() { + transaction { + // join table + val subscriber = createSubscriber() + + val key = EbicsPublicKey.new { + pub = "BINARYVALUE".toByteArray() + state = KeyStates.NEW + } + + subscriber.authorizationKey = key + } + } +} +\ No newline at end of file