Removing debug methods from the main binary
This commit is contained in:
+11
@@ -20,6 +20,9 @@
|
||||
*/
|
||||
package com.vitorpamplona.quartz.nip01Core.metadata
|
||||
|
||||
import com.vitorpamplona.quartz.nip01Core.core.Event
|
||||
import com.vitorpamplona.quartz.nip01Core.jackson.EventManualSerializer
|
||||
import com.vitorpamplona.quartz.nip01Core.jackson.EventMapper
|
||||
import com.vitorpamplona.quartz.utils.nsecToSigner
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
@@ -27,6 +30,14 @@ import org.junit.Test
|
||||
class UpdateMetadataTest {
|
||||
val signer = "nsec10g0wheggqn9dawlc0yuv6adnat6n09anr7eyykevw2dm8xa5fffs0wsdsr".nsecToSigner()
|
||||
|
||||
/**
|
||||
* For debug purposes only
|
||||
*/
|
||||
fun Event.toPrettyJson(): String {
|
||||
val obj = EventManualSerializer.assemble(id, pubKey, createdAt, kind, tags, content, sig)
|
||||
return EventMapper.mapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun createNewMetadata() {
|
||||
val test = signer.sign(MetadataEvent.createNew("Vitor", createdAt = 1740669816))
|
||||
|
||||
Reference in New Issue
Block a user