1
2
3
4
5
6
7
8
9
10
11 package org.mule.test.integration.exceptions;
12
13 import org.mule.api.MuleMessage;
14 import org.mule.module.client.MuleClient;
15 import org.mule.tck.FunctionalTestCase;
16
17 public class ExceptionsWithRouterMule2715TestCase extends FunctionalTestCase
18 {
19
20 public static final String MESSAGE = "message";
21 public static final long TIMEOUT = 5000L;
22
23 public void testWithRouter() throws Exception
24 {
25 doTest("with-router-in");
26 }
27
28 public void testWithoutRouter() throws Exception
29 {
30 doTest("without-router-in");
31 }
32
33 protected void doTest(String path) throws Exception
34 {
35 MuleClient client = new MuleClient(muleContext);
36 client.dispatch("vm://" + path, MESSAGE, null);
37 MuleMessage response = client.request("vm://error", TIMEOUT);
38 assertNotNull("exception null", response.getExceptionPayload());
39 }
40
41 protected String getConfigResources()
42 {
43 return "org/mule/test/integration/exceptions/exceptions-with-router-mule-2715.xml";
44 }
45
46 }