1
2
3
4
5
6
7
8
9
10 package org.mule.config.spring;
11
12 import org.mule.api.MuleRuntimeException;
13 import org.mule.tck.FunctionalTestCase;
14
15 import org.springframework.beans.FatalBeanException;
16
17 public class BeanCreationExceptionPropagationTestCase extends FunctionalTestCase
18 {
19 protected String getConfigResources()
20 {
21 return "org/mule/config/spring/bean-creation-exception-propagation-config.xml";
22 }
23
24 @Override
25 protected boolean isStartContext()
26 {
27
28 return false;
29 }
30
31 public void testBeanCreationExceptionPropagation()
32 {
33
34 try
35 {
36 muleContext.getRegistry().lookupObjects(Object.class);
37 fail("Should've failed with an exception");
38 }
39 catch (MuleRuntimeException e)
40 {
41 Throwable t = e.getCause();
42 assertNotNull(t);
43 assertTrue(t instanceof FatalBeanException);
44 }
45 }
46 }