diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-08-30 15:58:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-30 15:58:46 +0200 |
commit | c63ea36637ce956029fb15b1482c0683ecb8a587 (patch) | |
tree | 2b75a8a976b43530820e73dc60cce4b10d9fc005 /plugins/base/src/test/kotlin/transformerBuilders | |
parent | 0e00edc6fcd406fcf38673ef6a2f8f59e8374de2 (diff) | |
download | dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.tar.gz dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.tar.bz2 dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.zip |
Migrate to JUnit 5 and unify used test API (#3138)
Diffstat (limited to 'plugins/base/src/test/kotlin/transformerBuilders')
-rw-r--r-- | plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt b/plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt index b2b590d3..62741945 100644 --- a/plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt +++ b/plugins/base/src/test/kotlin/transformerBuilders/PageTransformerBuilderTest.kt @@ -11,11 +11,9 @@ import org.jetbrains.dokka.transformers.pages.PageTransformer import org.jetbrains.dokka.transformers.pages.pageMapper import org.jetbrains.dokka.transformers.pages.pageScanner import org.jetbrains.dokka.transformers.pages.pageStructureTransformer -import org.jsoup.Jsoup -import org.junit.jupiter.api.Test -import utils.TestOutputWriterPlugin -import utils.assertContains import utils.assertNotNull +import kotlin.test.Test +import kotlin.test.assertEquals class PageTransformerBuilderTest : BaseAbstractTest() { @@ -178,11 +176,10 @@ class PageTransformerBuilderTest : BaseAbstractTest() { } private fun <T> Collection<T>.assertCount(n: Int, prefix: String = "") = - assert(count() == n) { "${prefix}Expected $n, got ${count()}" } + assertEquals(n, count(), "${prefix}Expected $n, got ${count()}") - private fun <T> T.assertEqual(expected: T, prefix: String = "") = assert(this == expected) { - "${prefix}Expected $expected, got $this" - } + private fun <T> T.assertEqual(expected: T, prefix: String = "") = + assertEquals(expected, this, "${prefix}Expected $expected, got $this") private fun PageNode.assertTransform(expected: PageNode, block: (PageNode) -> PageNode = { it }): Unit = this.let { it.name.assertEqual(block(expected).name) |