diff options
Diffstat (limited to 'test/src/ClassTest.kt')
-rw-r--r-- | test/src/ClassTest.kt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/src/ClassTest.kt b/test/src/ClassTest.kt new file mode 100644 index 00000000..914df53b --- /dev/null +++ b/test/src/ClassTest.kt @@ -0,0 +1,43 @@ +package com.jetbrains.dokka.tests + +import org.junit.Test +import kotlin.test.* +import com.jetbrains.dokka.* + +public class ClassTest { + Test fun emptyClass() { + verifyModel("test/data/classes/emptyClass.kt") { model -> + val item = model.nodes.single().members.single() + assertEquals(DocumentationNodeKind.Class, item.kind) + assertEquals("Klass", item.name) + assertEquals("", item.doc) + assertTrue(item.details.none()) + assertEquals("<init>", item.members.single().name) + assertTrue(item.links.none()) + } + } + + Test fun classWithConstructor() { + verifyModel("test/data/classes/classWithConstructor.kt") { model -> + val item = model.nodes.single().members.single() + assertEquals(DocumentationNodeKind.Class, item.kind) + assertEquals("Klass", item.name) + assertEquals("", item.doc) + assertTrue(item.details.none()) + assertEquals("<init>", item.members.single().name) + assertTrue(item.links.none()) + } + } + + Test fun classWithFunction() { + verifyModel("test/data/classes/classWithFunction.kt") { model -> + val item = model.nodes.single().members.single() + assertEquals(DocumentationNodeKind.Class, item.kind) + assertEquals("Klass", item.name) + assertEquals("", item.doc) + assertTrue(item.details.none()) + assertEquals("<init>", item.members.single().name) + assertTrue(item.links.none()) + } + } +}
\ No newline at end of file |