aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-09-01 09:54:41 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-09-01 10:17:38 +0200
commitc24e9b5b0f0ac9a80ff36282fe708e4ee0ecf707 (patch)
tree9e4f9e0e8d2eb8ed4c481ba3e4bd108eab341a60 /plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt
parent98c18f2a686c78283d5373b4d768bfbb10952f2d (diff)
downloaddokka-c24e9b5b0f0ac9a80ff36282fe708e4ee0ecf707.tar.gz
dokka-c24e9b5b0f0ac9a80ff36282fe708e4ee0ecf707.tar.bz2
dokka-c24e9b5b0f0ac9a80ff36282fe708e4ee0ecf707.zip
Implement exitGenerationGracefully API
Diffstat (limited to 'plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt b/plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt
new file mode 100644
index 00000000..0262760d
--- /dev/null
+++ b/plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt
@@ -0,0 +1,18 @@
+package basic
+
+import org.jetbrains.dokka.DokkaGenerator
+import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
+import org.junit.jupiter.api.Test
+import kotlin.test.assertTrue
+
+class AbortGracefullyOnMissingDocumentablesTest: AbstractCoreTest() {
+ @Test
+ fun `Generation aborts Gracefully with no Documentables`() {
+ DokkaGenerator(dokkaConfiguration { }, logger).generate()
+
+ assertTrue(
+ logger.progressMessages.any { message -> "Exiting Generation: Nothing to document" == message },
+ "Expected graceful exit message. Found: ${logger.progressMessages}"
+ )
+ }
+}