diff options
Diffstat (limited to 'test/src')
-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) + } + } } } } - } - |