aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt
blob: 70d26e3c11dc27f13ae2e07b4efb4f368efb8d8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package basic

import org.jetbrains.dokka.DokkaGenerator
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
import org.junit.jupiter.api.Test
import kotlin.test.assertTrue

class AbortGracefullyOnMissingDocumentablesTest: BaseAbstractTest() {
    @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}"
        )
    }
}