Skip to content

Commit

Permalink
Added test lost after reverting commit 8aaaed9
Browse files Browse the repository at this point in the history
  • Loading branch information
tfesenko committed Oct 27, 2015
1 parent 3a7a760 commit 8a31462
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.reprezen.swagedit.editor.SwaggerDocument
import org.junit.Test
import org.yaml.snakeyaml.events.ScalarEvent
import static junit.framework.Assert.*
import io.swagger.util.Yaml

class SwaggerDocumentTest {

Expand Down Expand Up @@ -46,5 +47,26 @@ class SwaggerDocumentTest {
assertEquals(e1.value, "description")
assertEquals(e2.value, "Tax Blaster")
}

@Test
def void testGetRootMapping() {
val yaml = '''
info:
description: ""
tags:
- foo: ""
- bar: ""
'''

document.set(yaml)
val path = document.getPath(1)
println(path)

println(document.getPath(3))
val node = Yaml.mapper.readTree(yaml)
println(node)
//val events = document.getEvent(1)
//println(events)
}

}

0 comments on commit 8a31462

Please sign in to comment.