aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/basic/AbortGracefullyOnMissingDocumentablesTest.kt
blob: 693174ec605489630172e8b7bfee0640517f5509 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

package basic

import org.jetbrains.dokka.DokkaGenerator
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
import kotlin.test.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}"
        )
    }
}