diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-11 20:53:46 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-11 20:53:46 +0400 |
commit | 6afd7af76563f373e971256f8c9a7dcf42183fd4 (patch) | |
tree | afd350714842b4ec4d9145b8edd43f2962a51290 /test/src/model/PropertyTest.kt | |
parent | 044308ba60a0d4462ccb7388f16ad17a31d7450d (diff) | |
download | dokka-6afd7af76563f373e971256f8c9a7dcf42183fd4.tar.gz dokka-6afd7af76563f373e971256f8c9a7dcf42183fd4.tar.bz2 dokka-6afd7af76563f373e971256f8c9a7dcf42183fd4.zip |
Migrate tests to org.jetbrains.dokka
Diffstat (limited to 'test/src/model/PropertyTest.kt')
-rw-r--r-- | test/src/model/PropertyTest.kt | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/test/src/model/PropertyTest.kt b/test/src/model/PropertyTest.kt new file mode 100644 index 00000000..1d30f2ce --- /dev/null +++ b/test/src/model/PropertyTest.kt @@ -0,0 +1,90 @@ +package org.jetbrains.dokka.tests + +import org.junit.Test +import kotlin.test.* +import org.jetbrains.dokka.* + +public class PropertyTest { + Test fun valueProperty() { + verifyModel("test/data/properties/valueProperty.kt") { model -> + with(model.nodes.single().members.single()) { + assertEquals("property", name) + assertEquals(DocumentationNodeKind.Property, kind) + assertEquals("", doc) + assertTrue(details.none()) + assertTrue(members.none()) + assertTrue(links.none()) + } + } + } + + Test fun variableProperty() { + verifyModel("test/data/properties/variableProperty.kt") { model -> + with(model.nodes.single().members.single()) { + assertEquals("property", name) + assertEquals(DocumentationNodeKind.Property, kind) + assertEquals("", doc) + assertTrue(details.none()) + assertTrue(members.none()) + assertTrue(links.none()) + } + } + } + + Test fun valuePropertyWithGetter() { + verifyModel("test/data/properties/valuePropertyWithGetter.kt") { model -> + with(model.nodes.single().members.single()) { + assertEquals("property", name) + assertEquals(DocumentationNodeKind.Property, kind) + assertEquals("", doc) + assertTrue(details.none()) + assertTrue(links.none()) + with(members.single()) { + assertEquals("<get-property>", name) + assertEquals(DocumentationNodeKind.Function, kind) + assertEquals("", doc) + assertTrue(details.none()) + assertTrue(links.none()) + assertTrue(members.none()) + } + } + } + } + + Test fun variablePropertyWithAccessors() { + verifyModel("test/data/properties/variablePropertyWithAccessors.kt") { model -> + with(model.nodes.single().members.single()) { + assertEquals("property", name) + assertEquals(DocumentationNodeKind.Property, kind) + assertEquals("", doc) + assertTrue(details.none()) + assertTrue(links.none()) + + assertEquals(2, members.count()) + with(members.elementAt(0)) { + assertEquals("<get-property>", name) + assertEquals(DocumentationNodeKind.Function, kind) + assertEquals("", doc) + assertTrue(details.none()) + assertTrue(links.none()) + assertTrue(members.none()) + } + with(members.elementAt(1)) { + assertEquals("<set-property>", name) + assertEquals(DocumentationNodeKind.Function, kind) + assertEquals("", doc) + with(details.single()) { + assertEquals("value", name) + assertEquals(DocumentationNodeKind.Parameter, kind) + assertEquals("", doc) + assertTrue(details.none()) + assertTrue(links.none()) + assertTrue(members.none()) + } + assertTrue(links.none()) + assertTrue(members.none()) + } + } + } + } +} |