|
|
|
@ -20,7 +20,6 @@ import java.lang.annotation.ElementType;
@@ -20,7 +20,6 @@ import java.lang.annotation.ElementType;
|
|
|
|
|
import java.lang.annotation.Retention; |
|
|
|
|
import java.lang.annotation.RetentionPolicy; |
|
|
|
|
import java.lang.annotation.Target; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
@ -107,7 +106,9 @@ public class ConfigurationClassPostProcessorTests {
@@ -107,7 +106,9 @@ public class ConfigurationClassPostProcessorTests {
|
|
|
|
|
Foo foo = beanFactory.getBean("foo", Foo.class); |
|
|
|
|
Bar bar = beanFactory.getBean("bar", Bar.class); |
|
|
|
|
assertThat(bar.foo).isSameAs(foo); |
|
|
|
|
assertThat(Arrays.asList(beanFactory.getDependentBeans("foo")).contains("bar")).isTrue(); |
|
|
|
|
assertThat(ObjectUtils.containsElement(beanFactory.getDependentBeans("foo"), "bar")).isTrue(); |
|
|
|
|
assertThat(ObjectUtils.containsElement(beanFactory.getDependentBeans("config"), "foo")).isTrue(); |
|
|
|
|
assertThat(ObjectUtils.containsElement(beanFactory.getDependentBeans("config"), "bar")).isTrue(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@ -119,7 +120,9 @@ public class ConfigurationClassPostProcessorTests {
@@ -119,7 +120,9 @@ public class ConfigurationClassPostProcessorTests {
|
|
|
|
|
Foo foo = beanFactory.getBean("foo", Foo.class); |
|
|
|
|
Bar bar = beanFactory.getBean("bar", Bar.class); |
|
|
|
|
assertThat(bar.foo).isSameAs(foo); |
|
|
|
|
assertThat(Arrays.asList(beanFactory.getDependentBeans("foo")).contains("bar")).isTrue(); |
|
|
|
|
assertThat(ObjectUtils.containsElement(beanFactory.getDependentBeans("foo"), "bar")).isTrue(); |
|
|
|
|
assertThat(ObjectUtils.containsElement(beanFactory.getDependentBeans("config"), "foo")).isTrue(); |
|
|
|
|
assertThat(ObjectUtils.containsElement(beanFactory.getDependentBeans("config"), "bar")).isTrue(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|