Assert that parent autoconfig report is matched to parent BeanFactory

Test for gh-290
This commit is contained in:
Dave Syer 2014-01-30 09:01:06 +00:00
parent 9eb71c157a
commit 63fefbd7e7

View File

@ -96,6 +96,14 @@ public class AutoConfigurationReportTests {
sameInstance(AutoConfigurationReport.get(this.beanFactory)));
assertThat(this.report, not(nullValue()));
assertThat(this.report.getParent(), not(nullValue()));
AutoConfigurationReport.get((ConfigurableListableBeanFactory) this.beanFactory
.getParentBeanFactory());
assertThat(this.report,
sameInstance(AutoConfigurationReport.get(this.beanFactory)));
assertThat(this.report.getParent(),
sameInstance(AutoConfigurationReport
.get((ConfigurableListableBeanFactory) this.beanFactory
.getParentBeanFactory())));
}
@Test