From c63ea36637ce956029fb15b1482c0683ecb8a587 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Wed, 30 Aug 2023 15:58:46 +0200 Subject: Migrate to JUnit 5 and unify used test API (#3138) --- .../ParseModuleAndPackageDocumentationFragmentsTest.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'subprojects/analysis-kotlin-descriptors/compiler/src/test') diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt index 321aba45..b6105b9d 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt @@ -2,16 +2,17 @@ package org.jetbrains.dokka.analysis.kotlin.descriptors import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.moduledocs.* -import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.moduledocs.ModuleAndPackageDocumentation.Classifier.* +import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.moduledocs.ModuleAndPackageDocumentation.Classifier.Module +import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.moduledocs.ModuleAndPackageDocumentation.Classifier.Package import org.jetbrains.dokka.analysis.markdown.jb.MARKDOWN_ELEMENT_FILE_NAME import org.jetbrains.dokka.model.doc.* import org.jetbrains.dokka.utilities.DokkaLogger -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertThrows import org.junit.jupiter.api.io.TempDir import java.nio.file.Path +import kotlin.test.Test import kotlin.test.assertEquals +import kotlin.test.assertFailsWith +import kotlin.test.assertTrue class ParseModuleAndPackageDocumentationFragmentsTest { @@ -69,7 +70,7 @@ class ParseModuleAndPackageDocumentationFragmentsTest { @Test fun `no module name specified fails`() { - val exception = assertThrows { + val exception = assertFailsWith { parseModuleAndPackageDocumentationFragments( source( """ @@ -137,7 +138,7 @@ class ParseModuleAndPackageDocumentationFragmentsTest { @Test fun `white space in package name fails`() { - val exception = assertThrows { + val exception = assertFailsWith { parseModuleAndPackageDocumentationFragments( source( """ -- cgit