From 852a6ce6c0f43c9b2044320dcceb4c6cc0a3b302 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Tue, 11 Aug 2020 21:47:26 +0200 Subject: Refactor location providers --- .../kotlin/locationProvider/DefaultLocationProviderTest.kt | 4 ++-- .../test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/base/src/test/kotlin') diff --git a/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt b/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt index a219fb04..89161080 100644 --- a/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt +++ b/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt @@ -1,7 +1,7 @@ package locationProvider import org.jetbrains.dokka.plugability.DokkaContext -import org.jetbrains.dokka.base.resolvers.local.DefaultLocationProvider +import org.jetbrains.dokka.base.resolvers.local.DokkaLocationProvider import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest import org.junit.jupiter.api.Assertions.assertNotEquals import org.junit.jupiter.api.Test @@ -33,7 +33,7 @@ class DefaultLocationProviderTest: AbstractCoreTest() { } pagesGenerationStage = { module -> - val lp = DefaultLocationProvider(module, context!!) + val lp = DokkaLocationProvider(module, context!!) assertNotEquals(lp.resolve(module.children.single()).removePrefix("/"), lp.resolve(module)) } } diff --git a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt index eea4dc0c..4f55695d 100644 --- a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt +++ b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt @@ -5,9 +5,9 @@ import org.jetbrains.dokka.Platform import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.renderers.DefaultTabSortingStrategy import org.jetbrains.dokka.base.renderers.RootCreator -import org.jetbrains.dokka.base.resolvers.external.DokkaExternalLocationProviderFactory -import org.jetbrains.dokka.base.resolvers.external.JavadocExternalLocationProviderFactory -import org.jetbrains.dokka.base.resolvers.local.DefaultLocationProviderFactory +import org.jetbrains.dokka.base.resolvers.external.DefaultExternalLocationProviderFactory +import org.jetbrains.dokka.base.resolvers.external.javadoc.JavadocExternalLocationProviderFactory +import org.jetbrains.dokka.base.resolvers.local.DokkaLocationProviderFactory import org.jetbrains.dokka.testApi.context.MockContext import org.jsoup.Jsoup import org.jsoup.nodes.Element @@ -46,10 +46,10 @@ abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase() { val files = TestOutputWriter() override val context = MockContext( DokkaBase().outputWriter to { _ -> files }, - DokkaBase().locationProviderFactory to ::DefaultLocationProviderFactory, + DokkaBase().locationProviderFactory to ::DokkaLocationProviderFactory, DokkaBase().htmlPreprocessors to { _ -> RootCreator }, DokkaBase().externalLocationProviderFactory to { ::JavadocExternalLocationProviderFactory }, - DokkaBase().externalLocationProviderFactory to { ::DokkaExternalLocationProviderFactory }, + DokkaBase().externalLocationProviderFactory to { ::DefaultExternalLocationProviderFactory }, DokkaBase().tabSortingStrategy to { DefaultTabSortingStrategy() }, testConfiguration = DokkaConfigurationImpl( sourceSets = listOf(js, jvm, native) -- cgit