diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/java/member.java | 2 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 28 |
2 files changed, 20 insertions, 10 deletions
diff --git a/test/data/java/member.java b/test/data/java/member.java index 5eb9209f..cf978444 100644 --- a/test/data/java/member.java +++ b/test/data/java/member.java @@ -6,7 +6,7 @@ class Test { * @param name is String parameter * @param value is int parameter */ - public void Function(String name, int value) { + public void fn(String name, int value) { } }
\ No newline at end of file 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) + } + } } } } - } - |