diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-07-10 11:53:53 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-07-13 14:23:08 +0200 |
commit | 7b78890681ba81f1e38f5868fe9e6162efc540c0 (patch) | |
tree | 8a5ed72791d730a7769f95c93f7c09499343f3e6 | |
parent | c3eeb211bc51e19e1dc76c2fad4993bcf4999f5d (diff) | |
download | dokka-7b78890681ba81f1e38f5868fe9e6162efc540c0.tar.gz dokka-7b78890681ba81f1e38f5868fe9e6162efc540c0.tar.bz2 dokka-7b78890681ba81f1e38f5868fe9e6162efc540c0.zip |
Implement basic MultiModule0IntegrationTest.kt
3 files changed, 43 insertions, 2 deletions
diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/README.md b/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/README.md index 5f22dd72..f8c52880 100644 --- a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/README.md +++ b/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleB/README.md @@ -1,2 +1,2 @@ # Module moduleB -Here is some description +Here is some description for module B diff --git a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/README.md b/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/README.md index 7e1da8ec..4ead5671 100644 --- a/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/README.md +++ b/integration-tests/gradle/projects/it-multimodule-0/moduleA/moduleC/README.md @@ -1,2 +1,2 @@ # Module moduleC -Here is some description +Here is some description for module C 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) + } + } +} |