-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start adding tests for toObjectNode that is problematic with new memo…
… with json
- Loading branch information
1 parent
925ad9d
commit e1673a4
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
service/src/test/kotlin/io/provenance/explorer/domain/extensions/ExtenstionsKtTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} |