Remove KClass based Kotlin extensions

Issue: SPR-15660
This commit is contained in:
Sebastien Deleuze
2017-06-13 18:43:59 +02:00
parent 223315f96b
commit 04d5a2951c
18 changed files with 11 additions and 441 deletions

View File

@@ -38,14 +38,6 @@ class JdbcOperationsExtensionsTests {
@Mock(answer = Answers.RETURNS_MOCKS)
lateinit var template: JdbcTemplate
@Test
fun `queryForObject with KClass`() {
val sql = "select age from customer where id = 3"
val requiredType = Int::class
template.queryForObject(sql, requiredType)
verify(template, times(1)).queryForObject(sql, requiredType)
}
@Test
fun `queryForObject with reified type parameters`() {
val sql = "select age from customer where id = 3"
@@ -60,16 +52,6 @@ class JdbcOperationsExtensionsTests {
verify(template, times(1)).queryForObject(eq(sql), any<RowMapper<Int>>(), eq(3))
}
@Test
fun `queryForObject with argTypes`() {
val sql = "select age from customer where id = ?"
val args = arrayOf(3)
val argTypes = intArrayOf(JDBCType.INTEGER.vendorTypeNumber)
val requiredType = Int::class
template.queryForObject(sql, args, argTypes, requiredType)
verify(template, times(1)).queryForObject(sql, args, argTypes, requiredType)
}
@Test
fun `queryForObject with reified type parameters and argTypes`() {
val sql = "select age from customer where id = ?"
@@ -79,14 +61,6 @@ class JdbcOperationsExtensionsTests {
verify(template, times(1)).queryForObject(sql, args, argTypes, Integer::class.java)
}
@Test
fun `queryForObject with args`() {
val sql = "select age from customer where id = ?"
val args = arrayOf(3)
template.queryForObject(sql, args, Int::class)
verify(template, times(1)).queryForObject(sql, args, Int::class.java)
}
@Test
fun `queryForObject with reified type parameters and args`() {
val sql = "select age from customer where id = ?"
@@ -95,13 +69,6 @@ class JdbcOperationsExtensionsTests {
verify(template, times(1)).queryForObject(sql, args, Integer::class.java)
}
@Test
fun `queryForObject with varargs`() {
val sql = "select age from customer where id = ?"
template.queryForObject(sql, Int::class, 3)
verify(template, times(1)).queryForObject(sql, Int::class.java, 3)
}
@Test
fun `queryForList with reified type parameters`() {
val sql = "select age from customer where id = 3"