aboutsummaryrefslogtreecommitdiff
path: root/runners/cli/src/test/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'runners/cli/src/test/kotlin')
-rw-r--r--runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt46
1 files changed, 0 insertions, 46 deletions
diff --git a/runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt b/runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt
deleted file mode 100644
index 48441e4c..00000000
--- a/runners/cli/src/test/kotlin/org/jetbrains/dokka/CliTest.kt
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
- */
-
-package org.jetbrains.dokka
-
-import java.nio.file.Paths
-import kotlin.test.Test
-import kotlin.test.assertEquals
-import kotlin.test.assertTrue
-
-class CliIntegrationTest {
-
- @Test
- fun `should apply global settings to all source sets`() {
- val jsonPath = Paths.get(javaClass.getResource("/my-file.json")?.toURI() ?: throw IllegalStateException("No JSON found!")).toFile().toString()
- val globalArguments = GlobalArguments(arrayOf(jsonPath))
-
- val configuration = initializeConfiguration(globalArguments)
-
- configuration.sourceSets.forEach {
- assertTrue(it.perPackageOptions.isNotEmpty())
- assertTrue(it.sourceLinks.isNotEmpty())
- assertTrue(it.externalDocumentationLinks.isNotEmpty())
-
- assertTrue(it.externalDocumentationLinks.any { it.url.toString() == "https://docs.oracle.com/javase/8/docs/api/" })
- assertEquals(it.sourceLinks.single().localDirectory, "/home/Vadim.Mishenev/dokka/examples/cli/src/main/kotlin")
- assertEquals(it.perPackageOptions.single().matchingRegex, "my-custom-regex")
- }
-
- }
-
- @Test
- fun `should not fail when no sourceset options are specified`() {
- val jsonPath = Paths.get(javaClass.getResource("/my-file-no-sourceset-options.json")?.toURI() ?: throw IllegalStateException("No JSON found!")).toFile().toString()
- val globalArguments = GlobalArguments(arrayOf(jsonPath))
-
- val configuration = initializeConfiguration(globalArguments)
-
- configuration.sourceSets.forEach {
- assertTrue(it.perPackageOptions.isEmpty())
- assertTrue(it.sourceLinks.isEmpty())
- assertTrue(it.externalDocumentationLinks.size == 2) // there are default values, java and kotlin stdlibs
- }
- }
-}