[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: testing jackson
From: |
gnunet |
Subject: |
[libeufin] branch master updated: testing jackson |
Date: |
Tue, 27 Oct 2020 15:19:24 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 604a102 testing jackson
604a102 is described below
commit 604a102bba7d1b57449dcb2e1b86d339fc219467
Author: MS <ms@taler.net>
AuthorDate: Tue Oct 27 15:19:14 2020 +0100
testing jackson
---
nexus/src/test/kotlin/JsonTest.kt | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/nexus/src/test/kotlin/JsonTest.kt
b/nexus/src/test/kotlin/JsonTest.kt
new file mode 100644
index 0000000..9d421e8
--- /dev/null
+++ b/nexus/src/test/kotlin/JsonTest.kt
@@ -0,0 +1,22 @@
+import com.fasterxml.jackson.databind.JsonNode
+import org.junit.Test
+import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
+import com.fasterxml.jackson.module.kotlin.readValue
+import tech.libeufin.nexus.server.CreateBankConnectionFromBackupRequestJson
+
+
+class JsonTest {
+
+ @Test
+ fun testJackson() {
+ val mapper = jacksonObjectMapper()
+ val backupObj = CreateBankConnectionFromBackupRequestJson(
+ name = "backup", passphrase = "secret", data =
mapper.readTree("{}")
+ )
+ val roundTrip =
mapper.readValue<CreateBankConnectionFromBackupRequestJson>(mapper.writeValueAsString(backupObj))
+ assert(roundTrip.data.toString() == "{}" && roundTrip.passphrase ==
"secret" && roundTrip.name == "backup")
+
+ }
+
+
+}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: testing jackson,
gnunet <=