child bean definition's scope attribute can be inherited from parent bean definition now (SPR-3542)

This commit is contained in:
Juergen Hoeller
2009-11-12 00:09:05 +00:00
parent 4a25e2dde0
commit d0b6891275
6 changed files with 17 additions and 12 deletions

View File

@@ -1972,7 +1972,7 @@ public final class DefaultListableBeanFactoryTests {
}
@Test
public void testImplicitScopeInheritanceForChildBeanDefinitions() throws Exception {
public void testScopeInheritanceForChildBeanDefinitions() throws Exception {
RootBeanDefinition parent = new RootBeanDefinition();
parent.setScope("bonanza!");
@@ -1984,7 +1984,7 @@ public final class DefaultListableBeanFactoryTests {
factory.registerBeanDefinition("child", child);
BeanDefinition def = factory.getMergedBeanDefinition("child");
assertTrue("Child 'scope' not overriding parent scope (it must).", def.isSingleton());
assertEquals("Child 'scope' not inherited", "bonanza!", def.getScope());
}
@Test