aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc/src
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-08-30 15:58:46 +0200
committerGitHub <noreply@github.com>2023-08-30 15:58:46 +0200
commitc63ea36637ce956029fb15b1482c0683ecb8a587 (patch)
tree2b75a8a976b43530820e73dc60cce4b10d9fc005 /plugins/javadoc/src
parent0e00edc6fcd406fcf38673ef6a2f8f59e8374de2 (diff)
downloaddokka-c63ea36637ce956029fb15b1482c0683ecb8a587.tar.gz
dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.tar.bz2
dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.zip
Migrate to JUnit 5 and unify used test API (#3138)
Diffstat (limited to 'plugins/javadoc/src')
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt25
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt6
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt2
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt6
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt4
14 files changed, 39 insertions, 40 deletions
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt
index eca46421..cf4260d1 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAccessorNamingTest.kt
@@ -1,9 +1,9 @@
package org.jetbrains.dokka.javadoc
import org.jsoup.Jsoup
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
import utils.TestOutputWriterPlugin
+import kotlin.test.Test
+import kotlin.test.assertEquals
internal class JavadocAccessorNamingTest : AbstractJavadocTemplateMapTest() {
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt
index 6bfd068a..46e7535e 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocAllClassesTemplateMapTest.kt
@@ -4,8 +4,8 @@ import org.jetbrains.dokka.javadoc.pages.AllClassesPage
import org.jetbrains.dokka.javadoc.pages.LinkJavadocListEntry
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.pages.ContentKind
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
+import kotlin.test.Test
+import kotlin.test.assertEquals
internal class JavadocAllClassesTemplateMapTest : AbstractJavadocTemplateMapTest() {
@Test
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 53167f71..619f0936 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
@@ -1,8 +1,8 @@
package org.jetbrains.dokka.javadoc
import org.jetbrains.dokka.javadoc.pages.JavadocClasslikePageNode
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
+import kotlin.test.Test
+import kotlin.test.assertEquals
internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest() {
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt
index f301baf6..c58a3801 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt
@@ -2,8 +2,7 @@ package org.jetbrains.dokka.javadoc
import org.jetbrains.dokka.javadoc.pages.DeprecatedPage
import org.jetbrains.dokka.javadoc.renderer.TemplateMap
-import org.junit.jupiter.api.Assertions
-import org.junit.jupiter.api.Test
+import kotlin.test.Test
import kotlin.test.assertEquals
internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
@@ -12,7 +11,7 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
fun `generates correct number of sections`() {
testDeprecatedPageTemplateMaps { templateMap ->
@Suppress("UNCHECKED_CAST")
- Assertions.assertEquals(6, (templateMap["sections"] as List<TemplateMap>).size)
+ assertEquals(6, (templateMap["sections"] as List<TemplateMap>).size)
}
}
@@ -20,7 +19,7 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
fun `finds correct number of element for removal`() {
testDeprecatedPageTemplateMaps { templateMap ->
val map = templateMap.section("For Removal")
- Assertions.assertEquals(1, map.elements().size)
+ assertEquals(1, map.elements().size)
}
}
@@ -28,7 +27,7 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
fun `finds correct number of deprecated constructors`() {
testDeprecatedPageTemplateMaps { templateMap ->
val map = templateMap.section("Constructors")
- Assertions.assertEquals(1, map.elements().size)
+ assertEquals(1, map.elements().size)
}
}
@@ -36,7 +35,7 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
fun `finds correct number of deprecated classes`() {
testDeprecatedPageTemplateMaps { templateMap ->
val map = templateMap.section("Classes")
- Assertions.assertEquals(1, map.elements().size)
+ assertEquals(1, map.elements().size)
}
}
@@ -44,7 +43,7 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
fun `finds correct number of deprecated enums`() {
testDeprecatedPageTemplateMaps { templateMap ->
val map = templateMap.section("Enums")
- Assertions.assertEquals(1, map.elements().size)
+ assertEquals(1, map.elements().size)
}
}
@@ -52,7 +51,7 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
fun `finds correct number of deprecated exceptions`() {
testDeprecatedPageTemplateMaps { templateMap ->
val map = templateMap.section("Exceptions")
- Assertions.assertEquals(2, map.elements().size)
+ assertEquals(2, map.elements().size)
}
}
@@ -64,7 +63,7 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
AnnotationTarget.ANNOTATION_CLASS::class.java.methods.any { it.name == "describeConstable" }
val map = templateMap.section("Methods")
- Assertions.assertEquals(if (hasAdditionalFunction()) 5 else 4, map.elements().size)
+ assertEquals(if (hasAdditionalFunction()) 5 else 4, map.elements().size)
}
}
@@ -88,9 +87,9 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
testDeprecatedPageTemplateMaps { templateMap ->
val map = templateMap.section("Enums")
map.elements().first().let { element ->
- Assertions.assertEquals("package1.ClassCEnum", element["name"])
- Assertions.assertEquals("package1/ClassCEnum.html", element["address"])
- Assertions.assertEquals("Documentation for ClassCEnum", element["description"])
+ assertEquals("package1.ClassCEnum", element["name"])
+ assertEquals("package1/ClassCEnum.html", element["address"])
+ assertEquals("Documentation for ClassCEnum", element["description"])
}
}
}
@@ -188,4 +187,4 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
@Suppress("UNCHECKED_CAST")
private fun TemplateMap.elements() =
this["elements"] as List<TemplateMap>
-} \ No newline at end of file
+}
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt
index 4f334460..c4a3645b 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocIndexTest.kt
@@ -3,8 +3,8 @@ package org.jetbrains.dokka.javadoc
import org.jetbrains.dokka.javadoc.pages.IndexPage
import org.jetbrains.dokka.javadoc.renderer.TemplateMap
import org.jetbrains.dokka.links.DRI
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
+import kotlin.test.Test
+import kotlin.test.assertEquals
import kotlin.test.assertNotNull
internal class JavadocIndexTest : AbstractJavadocTemplateMapTest() {
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt
index ce14d675..cbba68c2 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocLocationTemplateMapTest.kt
@@ -1,8 +1,8 @@
package org.jetbrains.dokka.javadoc
import org.jetbrains.dokka.javadoc.pages.JavadocClasslikePageNode
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
+import kotlin.test.Test
+import kotlin.test.assertEquals
internal class JavadocLocationTemplateMapTest : AbstractJavadocTemplateMapTest() {
@Test
@@ -35,4 +35,4 @@ internal class JavadocLocationTemplateMapTest : AbstractJavadocTemplateMapTest()
assertEquals("../../../", map["pathToRoot"])
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt
index b647cd6e..befcefc4 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocModuleTemplateMapTest.kt
@@ -3,9 +3,9 @@ package org.jetbrains.dokka.javadoc
import org.jetbrains.dokka.javadoc.pages.JavadocModulePageNode
import org.jetbrains.dokka.javadoc.pages.RowJavadocListEntry
import org.jetbrains.dokka.links.DRI
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
import java.io.File
+import kotlin.test.Test
+import kotlin.test.assertEquals
internal class JavadocModuleTemplateMapTest : AbstractJavadocTemplateMapTest() {
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt
index a02b01fa..e0d2505c 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocPackageTemplateMapTest.kt
@@ -4,9 +4,9 @@ import org.jetbrains.dokka.javadoc.pages.JavadocContentKind
import org.jetbrains.dokka.javadoc.pages.JavadocPackagePageNode
import org.jetbrains.dokka.javadoc.pages.RowJavadocListEntry
import org.jetbrains.dokka.links.DRI
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
import java.io.File
+import kotlin.test.Test
+import kotlin.test.assertEquals
internal class JavadocPackageTemplateMapTest : AbstractJavadocTemplateMapTest() {
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt
index afb4f04c..aff9504f 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLinkingTest.kt
@@ -7,8 +7,8 @@ import org.jetbrains.dokka.kotlinStdlib
import org.jetbrains.dokka.model.doc.DocumentationLink
import org.jetbrains.dokka.model.doc.Text
import org.jetbrains.dokka.utilities.cast
-import org.junit.jupiter.api.Test
import utils.TestOutputWriterPlugin
+import kotlin.test.Test
import kotlin.test.assertEquals
class JavadocLinkingTest : BaseAbstractTest() {
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt
index 6f61f72b..de13e782 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt
@@ -14,8 +14,8 @@ import org.jetbrains.dokka.pages.RootPageNode
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.plugin
import org.jetbrains.dokka.plugability.querySingle
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
+import kotlin.test.Test
+import kotlin.test.assertEquals
class JavadocLocationTest : BaseAbstractTest() {
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt
index 1947fec7..95981df4 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt
@@ -1,9 +1,9 @@
package org.jetbrains.dokka.javadoc.packagelist
import org.jetbrains.dokka.javadoc.AbstractJavadocTemplateMapTest
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
import utils.TestOutputWriterPlugin
+import kotlin.test.Test
+import kotlin.test.assertEquals
internal class JavadocPackageListTest : AbstractJavadocTemplateMapTest() {
@Test
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt
index 590fa186..9c4569cb 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/search/JavadocIndexSearchTest.kt
@@ -1,9 +1,9 @@
package org.jetbrains.dokka.javadoc.search
import org.jetbrains.dokka.javadoc.AbstractJavadocTemplateMapTest
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
import utils.TestOutputWriterPlugin
+import kotlin.test.Test
+import kotlin.test.assertEquals
internal class JavadocIndexSearchTest : AbstractJavadocTemplateMapTest() {
@Test
@@ -59,4 +59,4 @@ internal class JavadocIndexSearchTest : AbstractJavadocTemplateMapTest() {
assertEquals(expectedMembersJson, contents["member-search-index.js"])
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt
index 0feae7fc..650a8016 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/transformers/documentables/JavadocDocumentableJVMSourceSetFilterTest.kt
@@ -2,7 +2,7 @@ package org.jetbrains.dokka.javadoc.transformers.documentables
import org.jetbrains.dokka.DokkaSourceSetID
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
-import org.junit.jupiter.api.Test
+import kotlin.test.Test
import kotlin.test.assertEquals
class JavadocDocumentableJVMSourceSetFilterTest: BaseAbstractTest() {
@@ -87,4 +87,4 @@ class JavadocDocumentableJVMSourceSetFilterTest: BaseAbstractTest() {
}
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt
index a892889d..4c4ad7b5 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/validity/MultiplatformConfiguredCheckerTest.kt
@@ -4,7 +4,7 @@ import org.jetbrains.dokka.DokkaConfigurationImpl
import org.jetbrains.dokka.DokkaException
import org.jetbrains.dokka.ExternalDocumentationLink
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
-import org.junit.jupiter.api.Test
+import kotlin.test.Test
import kotlin.test.assertFalse
import kotlin.test.assertTrue
@@ -87,4 +87,4 @@ class MultiplatformConfiguredCheckerTest : BaseAbstractTest() {
}
}
}
-} \ No newline at end of file
+}