aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/gradle/src/integrationTest
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-10 09:08:49 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-13 14:23:08 +0200
commit171f7faed806c9c744d16cf6fafa10f0edcc69b4 (patch)
treeb3a7b8cb7ec740a6d7f5f932184d7161aed3472a /integration-tests/gradle/src/integrationTest
parent663b2f4106347d413242e369f10eb30a27e908c5 (diff)
downloaddokka-171f7faed806c9c744d16cf6fafa10f0edcc69b4.tar.gz
dokka-171f7faed806c9c744d16cf6fafa10f0edcc69b4.tar.bz2
dokka-171f7faed806c9c744d16cf6fafa10f0edcc69b4.zip
Run all formats in BasicGradleIntegrationTest
Diffstat (limited to 'integration-tests/gradle/src/integrationTest')
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt42
1 files changed, 32 insertions, 10 deletions
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt
index c3adce4f..a15dc60a 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt
@@ -30,25 +30,35 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac
@Test
fun execute() {
- val result = createGradleRunner("dokka", "--stacktrace").build()
- assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokka")).outcome)
+ val result = createGradleRunner("dokkaKdoc", "dokkaJavadoc", "dokkaGfm", "dokkaJekyll", "--stacktrace").build()
- val dokkaOutputDir = File(projectDir, "build/dokka")
- assertTrue(dokkaOutputDir.isDirectory, "Missing dokka output directory")
+ assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaKdoc")).outcome)
+ assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaJavadoc")).outcome)
+ assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaGfm")).outcome)
+ assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaJekyll")).outcome)
- val imagesDir = File(dokkaOutputDir, "images")
+ File(projectDir, "build/dokka/kdoc").assertKdocOutputDir()
+ File(projectDir, "build/dokka/javadoc").assertJavadocOutputDir()
+ File(projectDir, "build/dokka/gfm").assertGfmOutputDir()
+ File(projectDir, "build/dokka/jekyll").assertJekyllOutputDir()
+ }
+
+ private fun File.assertKdocOutputDir() {
+ assertTrue(isDirectory, "Missing dokka kdoc output directory")
+
+ val imagesDir = File(this, "images")
assertTrue(imagesDir.isDirectory, "Missing images directory")
- val scriptsDir = File(dokkaOutputDir, "scripts")
+ val scriptsDir = File(this, "scripts")
assertTrue(scriptsDir.isDirectory, "Missing scripts directory")
- val stylesDir = File(dokkaOutputDir, "styles")
+ val stylesDir = File(this, "styles")
assertTrue(stylesDir.isDirectory, "Missing styles directory")
- val navigationHtml = File(dokkaOutputDir, "navigation.html")
+ val navigationHtml = File(this, "navigation.html")
assertTrue(navigationHtml.isFile, "Missing navigation.html")
- val moduleOutputDir = File(dokkaOutputDir, "it-basic")
+ val moduleOutputDir = File(this, "it-basic")
assertTrue(moduleOutputDir.isDirectory, "Missing module directory")
val moduleIndexHtml = File(moduleOutputDir, "index.html")
@@ -63,9 +73,21 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac
val moduleJavaPackageDir = File(moduleOutputDir, "it.basic.java")
assertTrue(moduleJavaPackageDir.isDirectory, "Missing it.basic.java package directory")
- dokkaOutputDir.allHtmlFiles().forEach { file ->
+ allHtmlFiles().forEach { file ->
assertContainsNoErrorClass(file)
assertNoUnresolvedLInks(file)
}
}
+
+ private fun File.assertJavadocOutputDir() {
+ assertTrue(isDirectory, "Missing dokka javadoc output directory")
+ }
+
+ private fun File.assertGfmOutputDir() {
+ assertTrue(isDirectory, "Missing dokka gfm output directory")
+ }
+
+ private fun File.assertJekyllOutputDir() {
+ assertTrue(isDirectory, "Missing dokka jekyll output directory")
+ }
}