diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-06-30 08:03:38 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-07-01 09:43:03 +0200 |
commit | a16e101fad10d024a84aa36069ec6032fcbaf3e6 (patch) | |
tree | 64e19695dccd67c3e1b1621eeac2ad469e01cb46 /plugins/base/src/test | |
parent | 14e71e40dfab5f18ccd56b0c015383c0dfb5df51 (diff) | |
download | dokka-a16e101fad10d024a84aa36069ec6032fcbaf3e6.tar.gz dokka-a16e101fad10d024a84aa36069ec6032fcbaf3e6.tar.bz2 dokka-a16e101fad10d024a84aa36069ec6032fcbaf3e6.zip |
Implement `AbstractJavadocTemplateMapTest` API
Diffstat (limited to 'plugins/base/src/test')
4 files changed, 12 insertions, 9 deletions
diff --git a/plugins/base/src/test/kotlin/basic/DRITest.kt b/plugins/base/src/test/kotlin/basic/DRITest.kt index b09932fe..1f4c7d93 100644 --- a/plugins/base/src/test/kotlin/basic/DRITest.kt +++ b/plugins/base/src/test/kotlin/basic/DRITest.kt @@ -1,11 +1,12 @@ package basic import org.jetbrains.dokka.links.* -import org.jetbrains.dokka.model.DClass -import org.jetbrains.dokka.model.DFunction -import org.jetbrains.dokka.model.DParameter -import org.jetbrains.dokka.model.OtherParameter +import org.jetbrains.dokka.links.Callable +import org.jetbrains.dokka.links.Nullable +import org.jetbrains.dokka.links.TypeConstructor +import org.jetbrains.dokka.model.* import org.jetbrains.dokka.pages.* +import org.jetbrains.dokka.pages.dfs import org.junit.jupiter.api.Assertions.assertEquals import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest @@ -158,7 +159,7 @@ class DRITest : AbstractCoreTest() { ) val driCount = module - .asSequence() + .withDescendants() .filterIsInstance<ContentPage>() .sumBy { it.dri.count { dri -> dri == expectedDRI } } diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt index 2e05d241..f6e80891 100644 --- a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt +++ b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt @@ -3,6 +3,7 @@ package content.params import matchers.content.* import org.jetbrains.dokka.Platform import org.jetbrains.dokka.model.DFunction +import org.jetbrains.dokka.model.dfs import org.jetbrains.dokka.model.doc.DocumentationNode import org.jetbrains.dokka.model.doc.Param import org.jetbrains.dokka.model.doc.Text @@ -607,4 +608,4 @@ class ContentForParamsTest : AbstractCoreTest() { private fun DocumentationNode.paramsDescription(): String = children.firstIsInstanceOrNull<Param>()?.root?.children?.firstIsInstanceOrNull<Text>()?.body.orEmpty() -}
\ No newline at end of file +} diff --git a/plugins/base/src/test/kotlin/enums/EnumsTest.kt b/plugins/base/src/test/kotlin/enums/EnumsTest.kt index dba5c24a..be910b5c 100644 --- a/plugins/base/src/test/kotlin/enums/EnumsTest.kt +++ b/plugins/base/src/test/kotlin/enums/EnumsTest.kt @@ -3,6 +3,7 @@ package enums import matchers.content.* import org.jetbrains.dokka.model.ConstructorValues import org.jetbrains.dokka.model.DEnum +import org.jetbrains.dokka.model.dfs import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest import org.junit.jupiter.api.Assertions.* @@ -230,4 +231,4 @@ class EnumsTest : AbstractCoreTest() { private fun ContentGroup.constructorSignature(): String = (children.single() as ContentGroup).children.drop(1).joinToString(separator = "") { (it as ContentText).text } -}
\ No newline at end of file +} diff --git a/plugins/base/src/test/kotlin/model/JavaTest.kt b/plugins/base/src/test/kotlin/model/JavaTest.kt index bd7e3b55..4cad784b 100644 --- a/plugins/base/src/test/kotlin/model/JavaTest.kt +++ b/plugins/base/src/test/kotlin/model/JavaTest.kt @@ -34,7 +34,7 @@ class JavaTest : AbstractModelTest("/src/main/kotlin/java/Test.java", "java") { with((this / "fn").cast<DFunction>()) { name equals "fn" val params = parameters.map { it.documentation.values.first().children.first() as Param } - params.mapNotNull { it.firstChildOfType<Text>()?.body } equals listOf("is String parameter", "is int parameter") + params.mapNotNull { it.firstChildOfTypeOrNull<Text>()?.body } equals listOf("is String parameter", "is int parameter") } } } @@ -449,4 +449,4 @@ class JavaTest : AbstractModelTest("/src/main/kotlin/java/Test.java", "java") { // assertEquals(1, inheritors.size) // } // } -}
\ No newline at end of file +} |