From cd52a20e56abcb15ebc11659bc79cac6a9b56a75 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Thu, 13 Aug 2020 12:01:24 +0200 Subject: Add external links to Javadoc tests --- .../jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt | 7 +++++-- .../jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'plugins') 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>(method["parameters"]).size, "Expected no parameters" ) - assertEquals("final String", method.modifiers()) + assertEquals("final String", method.modifiers()) assertEquals("testFunction()", method.signatureWithoutModifiers()) } } @@ -257,19 +257,19 @@ internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest( assertParameterNode( node = first, expectedName = "simple", - expectedType = "String", + expectedType = "String", expectedDescription = "simple String parameter" ) assertParameterNode( node = second, expectedName = "parameters", - expectedType = "Integer", + expectedType = "Integer", expectedDescription = "simple Integer parameter" ) assertParameterNode( node = third, expectedName = "list", - expectedType = "Boolean", + expectedType = "Boolean", expectedDescription = "simple Boolean parameter" ) } @@ -305,7 +305,7 @@ internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest( assertEquals("Generic", map["name"]) assertEquals( - "public final class Generic<T extends Serializable>", + "public final class Generic<T extends Serializable>", map.signatureWithModifiers() ) val methods = assertIsInstance>(map["methods"]) -- cgit