Revert "Ensure @Conditions consider super classes"
This reverts commit 620c16f5c7.
This commit is contained in:
@@ -54,21 +54,6 @@ public class ConfigurationClassWithConditionTests {
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void conditionalOnConfiguration() throws Exception {
|
||||
ctx.register(ConditionOnConfiguration.class);
|
||||
ctx.refresh();
|
||||
assertThat(ctx.getBeansOfType(ConditionOnConfiguration.class).size(), equalTo(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void inheritedConditionalOnConfiguration() throws Exception {
|
||||
ctx.register(InheritedConditionOnConfiguration.class);
|
||||
ctx.refresh();
|
||||
assertThat(ctx.getBeansOfType(ConditionOnConfiguration.class).size(), equalTo(0));
|
||||
assertThat(ctx.getBeansOfType(InheritedConditionOnConfiguration.class).size(), equalTo(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void conditionalOnMissingBeanMatch() throws Exception {
|
||||
ctx.register(BeanOneConfiguration.class, BeanTwoConfiguration.class);
|
||||
@@ -118,14 +103,6 @@ public class ConfigurationClassWithConditionTests {
|
||||
assertNull(ctx.getBean(NonConfigurationClass.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void inheritedNonConfigurationClass() throws Exception {
|
||||
ctx.register(InheritedNonConfigurationClass.class);
|
||||
ctx.refresh();
|
||||
thrown.expect(NoSuchBeanDefinitionException.class);
|
||||
assertNull(ctx.getBean(InheritedNonConfigurationClass.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void methodConditional() throws Exception {
|
||||
ctx.register(ConditionOnMethodConfiguration.class);
|
||||
@@ -141,13 +118,6 @@ public class ConfigurationClassWithConditionTests {
|
||||
ctx.refresh();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void inheritedImportsNotCreated() throws Exception {
|
||||
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
|
||||
ctx.register(InheritedImportsNotCreated.class);
|
||||
ctx.refresh();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void importsNotLoaded() throws Exception {
|
||||
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
|
||||
@@ -258,10 +228,6 @@ public class ConfigurationClassWithConditionTests {
|
||||
static class NonConfigurationClass {
|
||||
}
|
||||
|
||||
@Component
|
||||
static class InheritedNonConfigurationClass extends NonConfigurationClass {
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class ConditionOnMethodConfiguration {
|
||||
|
||||
@@ -281,21 +247,6 @@ public class ConfigurationClassWithConditionTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Never
|
||||
static class ConditionOnConfiguration {
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class InheritedConditionOnConfiguration extends ConditionOnConfiguration {
|
||||
}
|
||||
|
||||
|
||||
@Import({ ConfigurationNotCreated.class, RegistrarNotCreated.class, ImportSelectorNotCreated.class })
|
||||
static class InheritedImportsNotCreated extends ConditionOnConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class ConfigurationNotCreated {
|
||||
static {
|
||||
|
||||
Reference in New Issue
Block a user