Skip to content

Commit

Permalink
start adding tests for toObjectNode that is problematic with new memo…
Browse files Browse the repository at this point in the history
… with json
  • Loading branch information
nullpointer0x00 committed Nov 9, 2023
1 parent 925ad9d commit e1673a4
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package io.provenance.explorer.domain.extensions

import org.junit.jupiter.api.Test
import org.junit.jupiter.api.Assertions.*
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.node.ObjectNode
import org.apache.commons.lang3.StringEscapeUtils

class ExtensionsKtTest {

@Test
fun toObjectNode() {
// // Given an input JSON string
// val inputJson = "{\"key\":\"value\"}"
//
// // Create an ObjectMapper for testing
// val objectMapper = ObjectMapper()
//
// // Escape the input JSON
// val escapedInput = StringEscapeUtils.escapeJson(inputJson)
//
// // Convert the escaped JSON to an ObjectNode
// val resultObjectNode = escapedInput.toObjectNode(objectMapper)
//
// // Create an expected ObjectNode
// val expectedObjectNode = objectMapper.createObjectNode()
// expectedObjectNode.put("key", "value")
//
// // Assert that the result ObjectNode is equal to the expected ObjectNode
// assertEquals(expectedObjectNode, resultObjectNode)
}
}

0 comments on commit e1673a4

Please sign in to comment.