diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-13 14:37:30 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-13 14:37:30 +0100 |
commit | 7697bed83f4f4c1e7b853e415053107e45d8aded (patch) | |
tree | d0e13364334a76895bb962949cee7f4f86981ddd /test/src/model/JavaTest.kt | |
parent | 4a4601d6ccd1552c2254d43965f8b3bca7732e24 (diff) | |
download | dokka-7697bed83f4f4c1e7b853e415053107e45d8aded.tar.gz dokka-7697bed83f4f4c1e7b853e415053107e45d8aded.tar.bz2 dokka-7697bed83f4f4c1e7b853e415053107e45d8aded.zip |
initial implementation of JavaDocumentationBuilder
Diffstat (limited to 'test/src/model/JavaTest.kt')
-rw-r--r-- | test/src/model/JavaTest.kt | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt index e57be4a9..602e1382 100644 --- a/test/src/model/JavaTest.kt +++ b/test/src/model/JavaTest.kt @@ -5,19 +5,29 @@ import org.jetbrains.dokka.* import org.junit.* public class JavaTest { - Ignore Test fun function() { + Test fun function() { verifyModel("test/data/java/") { model -> val pkg = model.members.single() with(pkg.members.single()) { - assertEquals("fn", name) - assertEquals(DocumentationNode.Kind.Function, kind) - assertEquals("Function fn", content.summary) - assertEquals("Unit", detail(DocumentationNode.Kind.Type).name) - assertTrue(members.none()) - assertTrue(links.none()) + assertEquals("Test", name) + assertEquals(DocumentationNode.Kind.Class, kind) + with(members.single()) { + assertEquals("fn", name) + assertEquals(DocumentationNode.Kind.Function, kind) + assertEquals("Summary for Function", content.summary.toTestString()) + assertEquals("Unit", detail(DocumentationNode.Kind.Type).name) + assertTrue(members.none()) + assertTrue(links.none()) + with(details.first { it.name == "name" }) { + assertEquals(DocumentationNode.Kind.Parameter, kind) + assertEquals("String", detail(DocumentationNode.Kind.Type).name) + } + with(details.first { it.name == "value" }) { + assertEquals(DocumentationNode.Kind.Parameter, kind) + assertEquals("Int", detail(DocumentationNode.Kind.Type).name) + } + } } } } - } - |