1
2
3
4
5
6
7
8
9
10
11 package org.mule.config.spring;
12
13 import org.mule.api.MuleException;
14 import org.mule.module.client.MuleClient;
15
16 import java.util.Arrays;
17 import java.util.Collection;
18
19 import org.junit.Test;
20 import org.junit.runners.Parameterized.Parameters;
21
22 public class ClassInterceptorTestCase extends AbstractInterceptorTestCase
23 {
24 public ClassInterceptorTestCase(ConfigVariant variant, String configResources)
25 {
26 super(variant, configResources);
27 }
28
29 @Parameters
30 public static Collection<Object[]> parameters()
31 {
32 return Arrays.asList(new Object[][]{
33 {ConfigVariant.SERVICE, "org/mule/config/spring/class-interceptor-test-service.xml"},
34 {ConfigVariant.FLOW, "org/mule/config/spring/class-interceptor-test-flow.xml"}});
35 }
36
37 @Test
38 public void testInterceptor() throws MuleException, InterruptedException
39 {
40 MuleClient client = new MuleClient(muleContext);
41 client.send("vm://in", MESSAGE, null);
42 assertMessageIntercepted();
43 }
44 }