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

Commit 18b16ba

Browse files
committed
BoundKMapperで文字列に対してtoStringしたものを渡すテストを追加
1 parent c0afef5 commit 18b16ba

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/kotlin/com/mapk/kmapper/StringMappingTest.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import org.junit.jupiter.api.Nested
66
import org.junit.jupiter.api.Test
77

88
private data class StringMappingDst(val value: String)
9+
private data class BoundMappingSrc(val value: Int)
910

1011
@DisplayName("文字列に対してtoStringしたものを渡すテスト")
1112
class StringMappingTest {
@@ -18,4 +19,14 @@ class StringMappingTest {
1819
assertEquals("1", result.value)
1920
}
2021
}
22+
23+
@Nested
24+
@DisplayName("BoundKMapper")
25+
inner class BoundKMapperTest {
26+
@Test
27+
fun test() {
28+
val result = BoundKMapper(::StringMappingDst, BoundMappingSrc::class).map(BoundMappingSrc(100))
29+
assertEquals("100", result.value)
30+
}
31+
}
2132
}

0 commit comments

Comments
 (0)