diff options
Diffstat (limited to 'integration-tests/src')
-rw-r--r-- | integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt | 12 | ||||
-rw-r--r-- | integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt | 4 |
2 files changed, 6 insertions, 10 deletions
diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt index adc75f43..1eb11cfe 100644 --- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt +++ b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt @@ -1,10 +1,7 @@ package org.jetbrains.dokka.it import org.jsoup.Jsoup -import org.junit.Rule -import org.junit.rules.TemporaryFolder -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 +import org.junit.jupiter.api.io.TempDir import java.io.File import java.net.URL import kotlin.test.assertEquals @@ -12,13 +9,12 @@ import kotlin.test.assertFalse import kotlin.test.assertNotNull import kotlin.test.assertTrue -@RunWith(JUnit4::class) abstract class AbstractIntegrationTest { - @get:Rule - val temporaryTestFolder = TemporaryFolder() + @field:TempDir + lateinit var tempFolder: File - val projectDir get() = File(temporaryTestFolder.root, "project") + val projectDir get() = File(tempFolder, "project") fun File.allDescendentsWithExtension(extension: String): Sequence<File> = this.walkTopDown().filter { it.isFile && it.extension == extension } diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt index 30770838..54712851 100644 --- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt +++ b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt @@ -1,12 +1,12 @@ package org.jetbrains.dokka.it -import org.junit.After import java.io.File +import kotlin.test.AfterTest interface TestOutputCopier { val projectOutputLocation: File - @After + @AfterTest fun copyToLocation() { System.getenv("DOKKA_TEST_OUTPUT_PATH")?.also { location -> println("Copying to ${File(location).absolutePath}") |