blob: 860f4534ad43da3f1a160350b6da953480c06980 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package org.jetbrains.dokka.tests.externalLocationProviders
import junit.framework.Assert.assertEquals
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.resolvers.ExternalLocationProvider
import org.junit.Test
class ExternalLocationProviderTest {
val stdlibLink = DokkaConfiguration.ExternalDocumentationLink.Builder("https://kotlinlang.org/api/latest/jvm/stdlib/").build()
@Test fun kotlinString() {
val dri = DRI("kotlin", "String")
val link = ExternalLocationProvider.getLocation(dri, listOf(stdlibLink.packageListUrl))
assertEquals("kotlin/-string/index.html", link)
}
@Test fun kotlinCompareTo() {
val dri = DRI("kotlin", "String", "compareTo", "#Int#String")
val link = ExternalLocationProvider.getLocation(dri, listOf(stdlibLink.packageListUrl))
assertEquals("kotlin/-string/compare-to.html", link)
}
}
|