aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
index f7f7eb66..2659fd86 100644
--- a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
+++ b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
@@ -1,15 +1,14 @@
package content.annotations
import matchers.content.*
-import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
+import org.jetbrains.dokka.base.utils.firstNotNullOfOrNull
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.*
import org.jetbrains.dokka.pages.ContentPage
import org.jetbrains.dokka.pages.ContentText
import org.jetbrains.dokka.pages.MemberPageNode
import org.jetbrains.dokka.pages.PackagePageNode
-import org.jetbrains.kotlin.util.firstNotNullResult
import org.junit.jupiter.api.Test
import utils.ParamAttributes
import utils.assertNotNull
@@ -223,7 +222,7 @@ class ContentForAnnotationsTest : BaseAbstractTest() {
))
val property = modules.flatMap { it.packages }.flatMap { it.properties }.first()
val annotation = property.extra[Annotations]?.let {
- it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() }
+ it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations) -> annotations.firstOrNull() }
}
val annotationParams = annotation?.params ?: emptyMap()
@@ -284,10 +283,10 @@ class ContentForAnnotationsTest : BaseAbstractTest() {
val property = modules.flatMap { it.packages }.flatMap { it.properties }.first()
val getterAnnotation = property.getter?.extra?.get(Annotations)?.let {
- it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() }
+ it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations) -> annotations.firstOrNull() }
}
val setterAnnotation = property.getter?.extra?.get(Annotations)?.let {
- it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() }
+ it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations) -> annotations.firstOrNull() }
}
assertEquals(expectedAnnotation("xd"), getterAnnotation)