aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/gradle/src/main/kotlin/org/jetbrains
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests/gradle/src/main/kotlin/org/jetbrains')
-rw-r--r--integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt37
1 files changed, 2 insertions, 35 deletions
diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt
index bb2d0cc6..c8c8c844 100644
--- a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt
+++ b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt
@@ -2,25 +2,17 @@ package org.jetbrains.dokka.it.gradle
import org.gradle.testkit.runner.GradleRunner
import org.gradle.testkit.runner.internal.DefaultGradleRunner
-import org.junit.Rule
-import org.junit.rules.TemporaryFolder
+import org.jetbrains.dokka.it.AbstractIntegrationTest
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
import java.io.File
import kotlin.test.BeforeTest
-import kotlin.test.Test
-import kotlin.test.assertFalse
@RunWith(Parameterized::class)
-abstract class AbstractGradleIntegrationTest {
+abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() {
abstract val versions: BuildVersions
- @get:Rule
- val temporaryTestFolder = TemporaryFolder()
-
- val projectDir get() = File(temporaryTestFolder.root, "project")
-
@BeforeTest
fun copyTemplates() {
File("projects").listFiles().orEmpty()
@@ -49,30 +41,5 @@ abstract class AbstractGradleIntegrationTest {
).run { this as DefaultGradleRunner }
.withJvmArguments("-Xmx4G", "-XX:MaxMetaspaceSize=512M")
}
-
- fun File.allDescendentsWithExtension(extension: String): Sequence<File> {
- return this.walkTopDown().filter { it.isFile && it.extension == extension }
- }
-
- fun File.allHtmlFiles(): Sequence<File> {
- return allDescendentsWithExtension("html")
- }
-
- protected fun assertContainsNoErrorClass(file: File) {
- val fileText = file.readText()
- assertFalse(
- fileText.contains("ERROR CLASS", ignoreCase = true),
- "Unexpected `ERROR CLASS` in ${file.path}\n" + fileText
- )
- }
-
- protected fun assertNoUnresolvedLInks(file: File) {
- val regex = Regex("[\"']#[\"']")
- val fileText = file.readText()
- assertFalse(
- fileText.contains(regex),
- "Unexpected unresolved link in ${file.path}\n" + fileText
- )
- }
}