Remove KClass based Kotlin extensions
Issue: SPR-15660
This commit is contained in:
@@ -18,12 +18,6 @@ class BeanFactoryExtensionsTests {
|
||||
@Mock(answer = Answers.RETURNS_MOCKS)
|
||||
lateinit var bf: BeanFactory
|
||||
|
||||
@Test
|
||||
fun `getBean with KClass`() {
|
||||
bf.getBean(Foo::class)
|
||||
verify(bf, times(1)).getBean(Foo::class.java)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBean with reified type parameters`() {
|
||||
bf.getBean<Foo>()
|
||||
@@ -37,14 +31,6 @@ class BeanFactoryExtensionsTests {
|
||||
verify(bf, times(1)).getBean(name, Foo::class.java)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBean with KClass and varargs`() {
|
||||
val arg1 = "arg1"
|
||||
val arg2 = "arg2"
|
||||
bf.getBean(Foo::class, arg1, arg2)
|
||||
verify(bf, times(1)).getBean(Foo::class.java, arg1, arg2)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBean with reified type parameters and varargs`() {
|
||||
val arg1 = "arg1"
|
||||
|
||||
@@ -18,24 +18,6 @@ class ListableBeanFactoryExtensionsTests {
|
||||
@Mock(answer = Answers.RETURNS_MOCKS)
|
||||
lateinit var lbf: ListableBeanFactory
|
||||
|
||||
@Test
|
||||
fun `getBeanNamesForType with KClass`() {
|
||||
lbf.getBeanNamesForType(Foo::class)
|
||||
verify(lbf, times(1)).getBeanNamesForType(Foo::class.java, true , true)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeanNamesForType with KClass and Boolean`() {
|
||||
lbf.getBeanNamesForType(Foo::class, false)
|
||||
verify(lbf, times(1)).getBeanNamesForType(Foo::class.java, false , true)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeanNamesForType with KClass, Boolean and Boolean`() {
|
||||
lbf.getBeanNamesForType(Foo::class, false, false)
|
||||
verify(lbf, times(1)).getBeanNamesForType(Foo::class.java, false , false)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeanNamesForType with reified type parameters`() {
|
||||
lbf.getBeanNamesForType<Foo>()
|
||||
@@ -54,24 +36,6 @@ class ListableBeanFactoryExtensionsTests {
|
||||
verify(lbf, times(1)).getBeanNamesForType(Foo::class.java, false , false)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeansOfType with KClass`() {
|
||||
lbf.getBeansOfType(Foo::class)
|
||||
verify(lbf, times(1)).getBeansOfType(Foo::class.java, true , true)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeansOfType with KClass and Boolean`() {
|
||||
lbf.getBeansOfType(Foo::class, false)
|
||||
verify(lbf, times(1)).getBeansOfType(Foo::class.java, false , true)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeansOfType with KClass, Boolean and Boolean`() {
|
||||
lbf.getBeansOfType(Foo::class, false, false)
|
||||
verify(lbf, times(1)).getBeansOfType(Foo::class.java, false , false)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeansOfType with reified type parameters`() {
|
||||
lbf.getBeansOfType<Foo>()
|
||||
@@ -90,37 +54,18 @@ class ListableBeanFactoryExtensionsTests {
|
||||
verify(lbf, times(1)).getBeansOfType(Foo::class.java, false , false)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeanNamesForAnnotation with KClass`() {
|
||||
lbf.getBeanNamesForAnnotation(Bar::class)
|
||||
verify(lbf, times(1)).getBeanNamesForAnnotation(Bar::class.java)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeanNamesForAnnotation with reified type parameters`() {
|
||||
lbf.getBeanNamesForAnnotation<Bar>()
|
||||
verify(lbf, times(1)).getBeanNamesForAnnotation(Bar::class.java)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeansWithAnnotation with KClass`() {
|
||||
lbf.getBeansWithAnnotation(Bar::class)
|
||||
verify(lbf, times(1)).getBeansWithAnnotation(Bar::class.java)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `getBeansWithAnnotation with reified type parameters`() {
|
||||
lbf.getBeansWithAnnotation<Bar>()
|
||||
verify(lbf, times(1)).getBeansWithAnnotation(Bar::class.java)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `findAnnotationOnBean with String and KClass`() {
|
||||
val name = "bar"
|
||||
lbf.findAnnotationOnBean(name, Bar::class)
|
||||
verify(lbf, times(1)).findAnnotationOnBean(name, Bar::class.java)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `findAnnotationOnBean with String and reified type parameters`() {
|
||||
val name = "bar"
|
||||
|
||||
Reference in New Issue
Block a user