From 63fefbd7e70919845348e835d38cd2c692cbf60c Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Thu, 30 Jan 2014 09:01:06 +0000 Subject: [PATCH] Assert that parent autoconfig report is matched to parent BeanFactory Test for gh-290 --- .../boot/autoconfigure/AutoConfigurationReportTests.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationReportTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationReportTests.java index a072ed0c53d..557d73c27ed 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationReportTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationReportTests.java @@ -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