Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

Commit 7efed42

Browse files
committed
Make the test more thorough.
1 parent c507b76 commit 7efed42

File tree

1 file changed

+8
-2
lines changed
  • jvm/undertest-junit5-kotest/src/test/kotlin/undertest/junit5

1 file changed

+8
-2
lines changed

jvm/undertest-junit5-kotest/src/test/kotlin/undertest/junit5/UT_Memoize.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@ import com.diffplug.selfie.coroutines.memoize
44
import com.diffplug.selfie.coroutines.memoizeAsJson
55
import com.diffplug.selfie.coroutines.memoizeBinarySerializable
66
import io.kotest.core.spec.style.FunSpec
7+
import io.kotest.matchers.shouldBe
78

89
class UT_Memoize :
910
FunSpec({
1011
test("java.io.Serializable") {
11-
memoizeBinarySerializable { Book("Harry Potter", "J.K. Rowling") }.toBeFile_TODO("Book.bin")
12-
memoizeBinarySerializable { Book("Moby Dick", "Herman Melville") }.toBeBase64_TODO()
12+
memoizeBinarySerializable { Book("Harry Potter", "J.K. Rowling") }
13+
.toBeFile_TODO("Book.bin")
14+
.run { title shouldBe "Harry Potter" }
15+
memoizeBinarySerializable { Book("Moby Dick", "Herman Melville") }
16+
.toBeBase64_TODO()
17+
.run { title shouldBe "Moby Dick" }
1318
}
1419
test("kotlinx.serialization.Serializable") {
1520
memoizeAsJson { Book("Cat in the Hat", "Dr. Seuss") }
1621
.toBe("""{
1722
${' '} "title": "Cat in the Hat",
1823
${' '} "author": "Dr. Seuss"
1924
}""")
25+
.run { title shouldBe "Cat in the Hat" }
2026
}
2127
test("nanoTimeTest") {
2228
// easy way to test if it's memoizing or running every time

0 commit comments

Comments
 (0)