Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 97d2da0

Browse files
committed
privateなインスタンス関数に対するマッパーを追加
1 parent 144ce64 commit 97d2da0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/test/kotlin/mapk/core/SimpleKMapperTest.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,16 @@ data class Dst(
2121

2222
@DisplayName("単純なマッピングのテスト")
2323
class SimpleKMapperTest {
24-
val mappers: Set<KMapper<Dst>> =
25-
setOf(KMapper(Dst::class), KMapper(Dst::class.primaryConstructor!!), KMapper((Dst)::factory))
24+
private fun instanceFunction(arg1: Int, arg2: String?, arg3: Number): Dst {
25+
return Dst(arg1, arg2, arg3)
26+
}
27+
28+
val mappers: Set<KMapper<Dst>> = setOf(
29+
KMapper(Dst::class),
30+
KMapper(Dst::class.primaryConstructor!!),
31+
KMapper((Dst)::factory),
32+
KMapper(this::instanceFunction)
33+
)
2634

2735
@Nested
2836
@DisplayName("Map<String, Any?>からマップ")

0 commit comments

Comments
 (0)