diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-09-08 00:13:13 +0200 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-09-30 13:43:08 +0200 |
commit | adf99ba137bc6e40c3add9df70f906a16f9199a4 (patch) | |
tree | 755353814f7fa0ae45cdd7a7abbabdb47323d2ea /plugins/base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt | |
parent | 33c1eb4f6ad1d7ec4cd1e7760c37728a930a52b6 (diff) | |
download | dokka-adf99ba137bc6e40c3add9df70f906a16f9199a4.tar.gz dokka-adf99ba137bc6e40c3add9df70f906a16f9199a4.tar.bz2 dokka-adf99ba137bc6e40c3add9df70f906a16f9199a4.zip |
Add tests for relocations in ExternalLocationProviders
Diffstat (limited to 'plugins/base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt')
-rw-r--r-- | plugins/base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/plugins/base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt b/plugins/base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt index 31ffa0b3..165c7c15 100644 --- a/plugins/base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt +++ b/plugins/base/src/test/kotlin/locationProvider/Dokka010ExternalLocationProviderTest.kt @@ -1,15 +1,13 @@ package locationProvider -import org.jetbrains.dokka.ExternalDocumentationLink import org.jetbrains.dokka.base.resolvers.external.Dokka010ExternalLocationProvider -import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.base.resolvers.shared.ExternalDocumentation import org.jetbrains.dokka.base.resolvers.shared.PackageList import org.jetbrains.dokka.links.Callable import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.links.TypeConstructor +import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest -import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import java.net.URL @@ -24,7 +22,6 @@ class Dokka010ExternalLocationProviderTest : AbstractCoreTest() { sourceSet { sourceRoots = listOf("src/") classpath += jvmStdlibPath!! - ExternalDocumentationLink(kotlinLang, packageListURL.toString()) } } } @@ -103,4 +100,20 @@ class Dokka010ExternalLocationProviderTest : AbstractCoreTest() { assertEquals("$kotlinLang/kotlin/-int/max-value.html", locationProvider.resolve(dri)) } + + @Test + fun `should return null for method not in list`() { + val locationProvider = getTestLocationProvider() + val dri = DRI( + "foo", + "Bar", + Callable( + "baz", + null, + emptyList() + ) + ) + + assertEquals(null, locationProvider.resolve(dri)) + } } |