aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/gradle/src/integrationTest/kotlin/org
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-10 11:53:53 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-13 14:23:08 +0200
commit7b78890681ba81f1e38f5868fe9e6162efc540c0 (patch)
tree8a5ed72791d730a7769f95c93f7c09499343f3e6 /integration-tests/gradle/src/integrationTest/kotlin/org
parentc3eeb211bc51e19e1dc76c2fad4993bcf4999f5d (diff)
downloaddokka-7b78890681ba81f1e38f5868fe9e6162efc540c0.tar.gz
dokka-7b78890681ba81f1e38f5868fe9e6162efc540c0.tar.bz2
dokka-7b78890681ba81f1e38f5868fe9e6162efc540c0.zip
Implement basic MultiModule0IntegrationTest.kt
Diffstat (limited to 'integration-tests/gradle/src/integrationTest/kotlin/org')
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt41
1 files changed, 41 insertions, 0 deletions
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt
new file mode 100644
index 00000000..36362552
--- /dev/null
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt
@@ -0,0 +1,41 @@
+package org.jetbrains.dokka.it.gradle
+
+import org.gradle.testkit.runner.TaskOutcome
+import org.junit.runners.Parameterized
+import java.io.File
+import kotlin.test.*
+
+class MultiModule0IntegrationTest(override val versions: BuildVersions) : AbstractGradleIntegrationTest() {
+ companion object {
+ @get:JvmStatic
+ @get:Parameterized.Parameters(name = "{0}")
+ val versions = BuildVersions.permutations(
+ gradleVersions = listOf("6.5.1", "6.1.1"),
+ kotlinVersions = listOf("1.4-M2-eap-70")
+ )
+ }
+
+ @BeforeTest
+ fun prepareProjectFiles() {
+ val templateProjectDir = File("projects", "it-multimodule-0")
+ templateProjectDir.listFiles().orEmpty()
+ .filter { it.isFile }
+ .forEach { topLevelFile -> topLevelFile.copyTo(File(projectDir, topLevelFile.name)) }
+ File(templateProjectDir, "moduleA").copyRecursively(File(projectDir, "moduleA"))
+ }
+
+ @Test
+ fun execute() {
+ val result = createGradleRunner("dokkaKdoc", ":moduleA:dokkaKdocMultimodule", "--stacktrace").build()
+
+ assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":moduleA:dokkaKdocMultimodule")).outcome)
+
+ val dokkaOutputDir = File(projectDir, "moduleA/build/dokka/kdocMultimodule")
+ assertTrue(dokkaOutputDir.isDirectory, "Missing dokka output directory")
+
+ dokkaOutputDir.allHtmlFiles().forEach { file ->
+ assertContainsNoErrorClass(file)
+ assertNoUnresolvedLInks(file)
+ }
+ }
+}