diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-09-01 09:54:41 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-09-01 10:17:38 +0200 |
commit | c24e9b5b0f0ac9a80ff36282fe708e4ee0ecf707 (patch) | |
tree | 9e4f9e0e8d2eb8ed4c481ba3e4bd108eab341a60 /plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt | |
parent | 98c18f2a686c78283d5373b4d768bfbb10952f2d (diff) | |
download | dokka-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.kt | 18 |
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}" + ) + } +} |