aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/enums/EnumsTest.kt
diff options
context:
space:
mode:
authorSzymon Świstun <sswistun@virtuslab.com>2020-02-27 14:50:27 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-03-17 12:07:18 +0100
commit4002c4e91cb42ef77e93cac57ac49823629d33da (patch)
tree324deff126fd5ff0923f962770a30b880fd04c8e /plugins/base/src/test/kotlin/enums/EnumsTest.kt
parent6ed5e125d97e4ddc5b1cd80ed3567fa7bd2e63e6 (diff)
downloaddokka-4002c4e91cb42ef77e93cac57ac49823629d33da.tar.gz
dokka-4002c4e91cb42ef77e93cac57ac49823629d33da.tar.bz2
dokka-4002c4e91cb42ef77e93cac57ac49823629d33da.zip
Add expect with generation
Diffstat (limited to 'plugins/base/src/test/kotlin/enums/EnumsTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/enums/EnumsTest.kt20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/base/src/test/kotlin/enums/EnumsTest.kt b/plugins/base/src/test/kotlin/enums/EnumsTest.kt
index 34e92d82..55ad0fbc 100644
--- a/plugins/base/src/test/kotlin/enums/EnumsTest.kt
+++ b/plugins/base/src/test/kotlin/enums/EnumsTest.kt
@@ -3,9 +3,9 @@ package enums
import org.jetbrains.dokka.model.DEnum
import org.jetbrains.dokka.pages.ClasslikePageNode
import org.jetbrains.dokka.pages.ModulePageNode
-import org.junit.Assert.*
-import org.junit.Test
+import org.junit.jupiter.api.Test
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
+import org.junit.jupiter.api.Assertions.*
class EnumsTest : AbstractCoreTest() {
@@ -65,11 +65,11 @@ class EnumsTest : AbstractCoreTest() {
configuration
) {
documentablesCreationStage = {m ->
- assertTrue("Module list cannot be empty", m.isNotEmpty())
+ assertTrue(m.isNotEmpty(), "Module list cannot be empty")
m.first().packages.let { p ->
- assertTrue("Package list cannot be empty", p.isNotEmpty())
+ assertTrue(p.isNotEmpty(), "Package list cannot be empty")
p.first().classlikes.let { c ->
- assertTrue("Classlikes list cannot be empty", c.isNotEmpty())
+ assertTrue(c.isNotEmpty(), "Classlikes list cannot be empty")
val enum = c.first() as DEnum
assertEquals(enum.name, "Test")
@@ -78,12 +78,12 @@ class EnumsTest : AbstractCoreTest() {
}
}
}
- pagesGenerationStage = {
- val map = it.getClasslikeToMemberMap()
+ pagesGenerationStage = { module ->
+ val map = module.getClasslikeToMemberMap()
val test = map.filterKeys { it.name == "Test" }.values.firstOrNull()
- assert(test != null) { "Test not found" }
- assert(test!!.any { it.name == "E1" } && test.any { it.name == "E2" }) { "Enum entries missing in parent" }
- assert(map.keys.any { it.name == "E1" } && map.keys.any { it.name == "E2" }) { "Enum entries missing" }
+ assertNotNull(test, "Test not found")
+ assertTrue(test!!.any { it.name == "E1" } && test.any { it.name == "E2" }) { "Enum entries missing in parent" }
+ assertTrue(map.keys.any { it.name == "E1" } && map.keys.any { it.name == "E2" }) { "Enum entries missing" }
}
}
}