diff options
Diffstat (limited to 'plugins/base/src/test/kotlin/content')
4 files changed, 11 insertions, 11 deletions
diff --git a/plugins/base/src/test/kotlin/content/ContentInDescriptionTest.kt b/plugins/base/src/test/kotlin/content/ContentInDescriptionTest.kt index b44eb651..e5533a7e 100644 --- a/plugins/base/src/test/kotlin/content/ContentInDescriptionTest.kt +++ b/plugins/base/src/test/kotlin/content/ContentInDescriptionTest.kt @@ -1,9 +1,9 @@ package content -import junit.framework.Assert.assertEquals import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest import org.jetbrains.dokka.model.doc.* import org.junit.jupiter.api.Test +import kotlin.test.assertEquals import kotlin.test.assertTrue class ContentInDescriptionTest : BaseAbstractTest() { diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt index 664b8282..50580afc 100644 --- a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt +++ b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt @@ -1412,7 +1412,7 @@ class ContentForParamsTest : BaseAbstractTest() { it is MemberPageNode && it.dri.first() .toString() == "test/Main/sample/#java.lang.String#java.lang.String/PointingToDeclaration/" } as MemberPageNode - val forJvm = (sampleFunction.documentable as DFunction).parameters.mapNotNull { + val forJvm = (sampleFunction.documentables.firstOrNull() as DFunction).parameters.mapNotNull { val jvm = it.documentation.keys.first { it.analysisPlatform == Platform.jvm } it.documentation[jvm] } diff --git a/plugins/base/src/test/kotlin/content/properties/ContentForClassWithParamsAndPropertiesTest.kt b/plugins/base/src/test/kotlin/content/properties/ContentForClassWithParamsAndPropertiesTest.kt index 5bd152dc..164fa62d 100644 --- a/plugins/base/src/test/kotlin/content/properties/ContentForClassWithParamsAndPropertiesTest.kt +++ b/plugins/base/src/test/kotlin/content/properties/ContentForClassWithParamsAndPropertiesTest.kt @@ -24,7 +24,7 @@ class ContentForClassWithParamsAndPropertiesTest : BaseAbstractTest() { propertyTest { rootPage -> val node = rootPage.dfs { it.name == "LoadInitialParams" } as ClasslikePageNode val actualDocsForPlaceholdersEnabled = - (node.documentable as DClass).constructors.first().parameters.find { it.name == "placeholdersEnabled" } + (node.documentables.firstOrNull() as DClass).constructors.first().parameters.find { it.name == "placeholdersEnabled" } ?.documentation?.entries?.first()?.value assertEquals(DocumentationNode(listOf(docsForPlaceholdersEnabled)), actualDocsForPlaceholdersEnabled) } @@ -35,7 +35,7 @@ class ContentForClassWithParamsAndPropertiesTest : BaseAbstractTest() { propertyTest { rootPage -> val node = rootPage.dfs { it.name == "LoadInitialParams" } as ClasslikePageNode val actualDocsForRequestedLoadSize = - (node.documentable as DClass).constructors.first().parameters.find { it.name == "requestedLoadSize" } + (node.documentables.firstOrNull() as DClass).constructors.first().parameters.find { it.name == "requestedLoadSize" } ?.documentation?.entries?.first()?.value assertEquals(DocumentationNode(listOf(docsForRequestedLoadSize)), actualDocsForRequestedLoadSize) } @@ -47,7 +47,7 @@ class ContentForClassWithParamsAndPropertiesTest : BaseAbstractTest() { val node = rootPage.dfs { it.name == "LoadInitialParams" } as ClasslikePageNode val actualDocsForRequestedInitialKey = - (node.documentable as DClass).constructors.first().parameters.find { it.name == "requestedInitialKey" } + (node.documentables.firstOrNull() as DClass).constructors.first().parameters.find { it.name == "requestedInitialKey" } ?.documentation?.entries?.first()?.value assertEquals(DocumentationNode(listOf(docsForRequestedInitialKey)), actualDocsForRequestedInitialKey) } @@ -71,7 +71,7 @@ class ContentForClassWithParamsAndPropertiesTest : BaseAbstractTest() { val node = rootPage.dfs { it.name == "LoadInitialParams" } as ClasslikePageNode val actualDocs = - (node.documentable as DClass).constructors.first().documentation.entries.first().value + (node.documentables.firstOrNull() as DClass).constructors.first().documentation.entries.first().value assertEquals(DocumentationNode(listOf(constructorDocs, docsForParam)), actualDocs) } } @@ -94,7 +94,7 @@ class ContentForClassWithParamsAndPropertiesTest : BaseAbstractTest() { val node = rootPage.dfs { it.name == "LoadInitialParams" } as ClasslikePageNode val actualDocs = - (node.documentable as DClass).documentation.entries.first().value + (node.documentables.firstOrNull() as DClass).documentation.entries.first().value assertEquals( DocumentationNode( listOf( @@ -129,7 +129,7 @@ class ContentForClassWithParamsAndPropertiesTest : BaseAbstractTest() { val node = rootPage.dfs { it.name == "ItemKeyedDataSource" } as ClasslikePageNode val actualDocs = - (node.documentable as DClass).properties.first().documentation.entries.first().value + (node.documentables.firstOrNull() as DClass).properties.first().documentation.entries.first().value assertEquals( DocumentationNode(listOf(ownDescription)), actualDocs diff --git a/plugins/base/src/test/kotlin/content/receiver/ContentForReceiverTest.kt b/plugins/base/src/test/kotlin/content/receiver/ContentForReceiverTest.kt index e566320c..d7399914 100644 --- a/plugins/base/src/test/kotlin/content/receiver/ContentForReceiverTest.kt +++ b/plugins/base/src/test/kotlin/content/receiver/ContentForReceiverTest.kt @@ -1,7 +1,5 @@ package content.receiver -import junit.framework.Assert.assertEquals -import junit.framework.Assert.assertNotNull import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest import org.jetbrains.dokka.model.dfs import org.jetbrains.dokka.model.doc.Receiver @@ -11,6 +9,8 @@ import org.jetbrains.dokka.pages.ContentText import org.jetbrains.dokka.pages.MemberPageNode import org.junit.jupiter.api.Test import utils.docs +import kotlin.test.assertEquals +import kotlin.test.assertNotNull class ContentForReceiverTest: BaseAbstractTest() { private val testConfiguration = dokkaConfiguration { @@ -40,7 +40,7 @@ class ContentForReceiverTest: BaseAbstractTest() { with(module.packages.flatMap { it.functions }.first()){ val receiver = docs().firstOrNull { it is Receiver } assertNotNull(receiver) - val content = receiver?.dfs { it is Text } as Text + val content = receiver.dfs { it is Text } as Text assertEquals("docs for string", content.body) } } |