This repository was archived by the owner on Apr 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
jvm/undertest-junit5-kotest/src/test/kotlin/undertest/junit5 Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -4,19 +4,25 @@ import com.diffplug.selfie.coroutines.memoize
4
4
import com.diffplug.selfie.coroutines.memoizeAsJson
5
5
import com.diffplug.selfie.coroutines.memoizeBinarySerializable
6
6
import io.kotest.core.spec.style.FunSpec
7
+ import io.kotest.matchers.shouldBe
7
8
8
9
class UT_Memoize :
9
10
FunSpec ({
10
11
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" }
13
18
}
14
19
test(" kotlinx.serialization.Serializable" ) {
15
20
memoizeAsJson { Book (" Cat in the Hat" , " Dr. Seuss" ) }
16
21
.toBe(""" {
17
22
${' ' } "title": "Cat in the Hat",
18
23
${' ' } "author": "Dr. Seuss"
19
24
}""" )
25
+ .run { title shouldBe " Cat in the Hat" }
20
26
}
21
27
test(" nanoTimeTest" ) {
22
28
// easy way to test if it's memoizing or running every time
You can’t perform that action at this time.
0 commit comments