aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/basic
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/basic')
-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}"
+ )
+ }
+}