aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-08-13 12:01:24 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-19 13:34:10 +0200
commitcd52a20e56abcb15ebc11659bc79cac6a9b56a75 (patch)
tree0527bf759706658628f9ee1f3fe8b6b0fcf328e4 /plugins/javadoc
parent852a6ce6c0f43c9b2044320dcceb4c6cc0a3b302 (diff)
downloaddokka-cd52a20e56abcb15ebc11659bc79cac6a9b56a75.tar.gz
dokka-cd52a20e56abcb15ebc11659bc79cac6a9b56a75.tar.bz2
dokka-cd52a20e56abcb15ebc11659bc79cac6a9b56a75.zip
Add external links to Javadoc tests
Diffstat (limited to 'plugins/javadoc')
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt7
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt10
2 files changed, 10 insertions, 7 deletions
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt
index ff254f99..68b45678 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt
@@ -1,10 +1,9 @@
package org.jetbrains.dokka.javadoc
+import org.jetbrains.dokka.DokkaConfigurationImpl
import org.jetbrains.dokka.javadoc.pages.JavadocPageNode
import org.jetbrains.dokka.javadoc.pages.preprocessors
import org.jetbrains.dokka.javadoc.renderer.JavadocContentToTemplateMapTranslator
-import org.jetbrains.dokka.DokkaConfigurationImpl
-import org.jetbrains.dokka.javadoc.JavadocPlugin
import org.jetbrains.dokka.model.withDescendants
import org.jetbrains.dokka.pages.RootPageNode
import org.jetbrains.dokka.plugability.DokkaContext
@@ -20,6 +19,10 @@ internal abstract class AbstractJavadocTemplateMapTest : AbstractCoreTest() {
sourceSet {
sourceRoots = listOf("src")
analysisPlatform = "jvm"
+ externalDocumentationLinks = listOf(
+ externalDocumentationLink("https://docs.oracle.com/javase/8/docs/api/"),
+ externalDocumentationLink("https://kotlinlang.org/api/latest/jvm/stdlib/")
+ )
}
}
}
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt
index 1e161666..2ae5302d 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt
@@ -93,7 +93,7 @@ internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest(
0, assertIsInstance<List<*>>(method["parameters"]).size,
"Expected no parameters"
)
- assertEquals("final String", method.modifiers())
+ assertEquals("final <a href=https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>String</a>", method.modifiers())
assertEquals("<a href=TestClass.html#testFunction()>testFunction</a>()", method.signatureWithoutModifiers())
}
}
@@ -257,19 +257,19 @@ internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest(
assertParameterNode(
node = first,
expectedName = "simple",
- expectedType = "String",
+ expectedType = "<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>String</a>",
expectedDescription = "simple String parameter"
)
assertParameterNode(
node = second,
expectedName = "parameters",
- expectedType = "Integer",
+ expectedType = "<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html>Integer</a>",
expectedDescription = "simple Integer parameter"
)
assertParameterNode(
node = third,
expectedName = "list",
- expectedType = "Boolean",
+ expectedType = "<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html>Boolean</a>",
expectedDescription = "simple Boolean parameter"
)
}
@@ -305,7 +305,7 @@ internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest(
assertEquals("Generic", map["name"])
assertEquals(
- "public final class <a href=Generic.html>Generic</a>&lt;T extends Serializable&gt;",
+ "public final class <a href=Generic.html>Generic</a>&lt;T extends <a href=https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html>Serializable</a>&gt;",
map.signatureWithModifiers()
)
val methods = assertIsInstance<Map<Any, Any?>>(map["methods"])