aboutsummaryrefslogtreecommitdiff
path: root/test/src/model/LinkTest.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-12-16 21:41:32 +0300
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-12-16 21:41:32 +0300
commitbd6cddd932c308519ce386197b93de145462bec2 (patch)
tree5cb04a2cd8f7dfd7e1c679f16977a51d5d966faa /test/src/model/LinkTest.kt
parent9535260e7b9f1483fbbfcf0abf4c171311fd92b7 (diff)
downloaddokka-bd6cddd932c308519ce386197b93de145462bec2.tar.gz
dokka-bd6cddd932c308519ce386197b93de145462bec2.tar.bz2
dokka-bd6cddd932c308519ce386197b93de145462bec2.zip
Process short links.
Diffstat (limited to 'test/src/model/LinkTest.kt')
-rw-r--r--test/src/model/LinkTest.kt48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/src/model/LinkTest.kt b/test/src/model/LinkTest.kt
new file mode 100644
index 00000000..151d2696
--- /dev/null
+++ b/test/src/model/LinkTest.kt
@@ -0,0 +1,48 @@
+package org.jetbrains.dokka.tests
+
+import org.junit.Test
+import kotlin.test.*
+import org.jetbrains.dokka.*
+
+public class LinkTest {
+ Test fun linkToSelf() {
+ verifyModel("test/data/links/linkToSelf.kt") { model ->
+ with(model.members.single().members.single()) {
+ assertEquals("Foo", name)
+ assertEquals(DocumentationNode.Kind.Class, kind)
+ assertEquals("This is link to [Foo -> Class:Foo]", content.summary.toTestString())
+ }
+ }
+ }
+
+ Test fun linkToMember() {
+ verifyModel("test/data/links/linkToMember.kt") { model ->
+ with(model.members.single().members.single()) {
+ assertEquals("Foo", name)
+ assertEquals(DocumentationNode.Kind.Class, kind)
+ assertEquals("This is link to [member -> Function:member]", content.summary.toTestString())
+ }
+ }
+ }
+
+ Test fun linkToQualifiedMember() {
+ verifyModel("test/data/links/linkToQualifiedMember.kt") { model ->
+ with(model.members.single().members.single()) {
+ assertEquals("Foo", name)
+ assertEquals(DocumentationNode.Kind.Class, kind)
+ assertEquals("This is link to [Foo.member -> Function:member]", content.summary.toTestString())
+ }
+ }
+ }
+
+ Test fun linkToParam() {
+ verifyModel("test/data/links/linkToParam.kt") { model ->
+ with(model.members.single().members.single()) {
+ assertEquals("Foo", name)
+ assertEquals(DocumentationNode.Kind.Function, kind)
+ assertEquals("This is link to [param -> Parameter:param]", content.summary.toTestString())
+ }
+ }
+ }
+
+} \ No newline at end of file