aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/basic/LoggerTest.kt
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-11-10 11:46:54 +0100
committerGitHub <noreply@github.com>2023-11-10 11:46:54 +0100
commit8e5c63d035ef44a269b8c43430f43f5c8eebfb63 (patch)
tree1b915207b2b9f61951ddbf0ff2e687efd053d555 /plugins/base/src/test/kotlin/basic/LoggerTest.kt
parenta44efd4ba0c2e4ab921ff75e0f53fc9335aa79db (diff)
downloaddokka-8e5c63d035ef44a269b8c43430f43f5c8eebfb63.tar.gz
dokka-8e5c63d035ef44a269b8c43430f43f5c8eebfb63.tar.bz2
dokka-8e5c63d035ef44a269b8c43430f43f5c8eebfb63.zip
Restructure the project to utilize included builds (#3174)
* Refactor and simplify artifact publishing * Update Gradle to 8.4 * Refactor and simplify convention plugins and build scripts Fixes #3132 --------- Co-authored-by: Adam <897017+aSemy@users.noreply.github.com> Co-authored-by: Oleg Yukhnevich <whyoleg@gmail.com>
Diffstat (limited to 'plugins/base/src/test/kotlin/basic/LoggerTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/basic/LoggerTest.kt48
1 files changed, 0 insertions, 48 deletions
diff --git a/plugins/base/src/test/kotlin/basic/LoggerTest.kt b/plugins/base/src/test/kotlin/basic/LoggerTest.kt
deleted file mode 100644
index 12c39690..00000000
--- a/plugins/base/src/test/kotlin/basic/LoggerTest.kt
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.utilities.DokkaConsoleLogger
-import org.jetbrains.dokka.utilities.LoggingLevel
-import org.jetbrains.dokka.utilities.MessageEmitter
-import kotlin.test.Test
-import kotlin.test.assertFalse
-import kotlin.test.assertTrue
-
-class LoggerTest {
- class AccumulatingEmitter : MessageEmitter {
- val messages: MutableList<String> = mutableListOf()
- override fun invoke(message: String) {
- messages.add(message)
- }
- }
-
- @Test
- fun `should display info messages if logging is info`(){
- val emitter = AccumulatingEmitter()
- val logger = DokkaConsoleLogger(LoggingLevel.INFO, emitter)
-
- logger.debug("Debug!")
- logger.info("Info!")
-
- assertTrue(emitter.messages.size > 0)
- assertTrue(emitter.messages.any { it == "Info!" })
- assertFalse(emitter.messages.any { it == "Debug!" })
- }
-
- @Test
- fun `should not display info messages if logging is warn`(){
- val emitter = AccumulatingEmitter()
- val logger = DokkaConsoleLogger(LoggingLevel.WARN, emitter)
-
- logger.warn("Warning!")
- logger.info("Info!")
-
-
- assertTrue(emitter.messages.size > 0)
- assertFalse(emitter.messages.any { it.contains("Info!") })
- assertTrue(emitter.messages.any { it.contains("Warning!") })
- }
-}