RESOLVED - issue BATCH-1230: scope "step" does not work together with Annotation "@BeforeStep"

This commit is contained in:
dsyer
2009-05-04 11:21:34 +00:00
parent 0b17684192
commit 19dee310c6
4 changed files with 75 additions and 42 deletions

View File

@@ -67,7 +67,7 @@ public class StepListenerParserTests {
}
@Test
public void testInheritListeners_NoMerge() throws Exception {
public void testInheritListenersNoMerge() throws Exception {
ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext(
"org/springframework/batch/core/configuration/xml/StepListenerParserTests-context.xml");
List<?> list = getListeners("s2", ctx);

View File

@@ -241,7 +241,9 @@ public class StepListenerFactoryBeanTests {
}
};
ProxyFactory factory = new ProxyFactory(delegate);
assertTrue(StepListenerFactoryBean.isListener(factory.getProxy()));
Object proxy = factory.getProxy();
assertTrue(StepListenerFactoryBean.isListener(proxy));
((StepExecutionListener) StepListenerFactoryBean.getListener(proxy)).beforeStep(null);
}
@Test