aboutsummaryrefslogtreecommitdiff
path: root/plugins/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt
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/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt
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/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt')
-rw-r--r--plugins/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt26
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt b/plugins/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt
index 525331fc..a92fa115 100644
--- a/plugins/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt
+++ b/plugins/all-modules-page/src/test/kotlin/templates/MultiModuleDocumentationTest.kt
@@ -6,37 +6,37 @@ import org.jetbrains.dokka.model.dfs
import org.jetbrains.dokka.pages.ContentKind
import org.jetbrains.dokka.pages.ContentResolvedLink
import org.jetbrains.dokka.pages.MultimoduleRootPageNode
-import org.junit.Rule
-import org.junit.jupiter.api.AfterEach
-import org.junit.jupiter.api.BeforeEach
-import org.junit.jupiter.api.Test
-import org.junit.rules.TemporaryFolder
+import org.junit.jupiter.api.io.TempDir
+import java.io.File
+import kotlin.test.AfterTest
+import kotlin.test.BeforeTest
+import kotlin.test.Test
import kotlin.test.assertEquals
class MultiModuleDocumentationTest : MultiModuleAbstractTest() {
- @get:Rule
- val folder: TemporaryFolder = TemporaryFolder()
+
+ @field:TempDir
+ lateinit var tempDir: File
val documentationContent = """
# Sample project
Sample documentation with [external link](https://www.google.pl)
""".trimIndent()
- @BeforeEach
+ @BeforeTest
fun setup() {
- folder.create()
- folder.root.resolve("README.md").writeText(documentationContent)
+ tempDir.resolve("README.md").writeText(documentationContent)
}
- @AfterEach
+ @AfterTest
fun teardown(){
- folder.root.resolve("README.md").delete()
+ tempDir.resolve("README.md").delete()
}
@Test
fun `documentation should be included in all modules page`() {
val configuration = dokkaConfiguration {
- includes = listOf(folder.root.resolve("README.md"))
+ includes = listOf(tempDir.resolve("README.md"))
}
testFromData(configuration) {