1
2
3
4
5
6
7
8
9
10 package org.mule.module.ibeans;
11
12 import org.mule.tck.AbstractMuleTestCase;
13
14 import org.ibeans.annotation.IntegrationBean;
15
16 public class IntegrationBeanAnnotationTestCase extends AbstractMuleTestCase
17 {
18 public IntegrationBeanAnnotationTestCase()
19 {
20 setStartContext(true);
21 }
22
23 @SuppressWarnings("unused")
24 @IntegrationBean
25 private HostIpIBean hostip;
26
27 @Override
28 protected void doSetUp() throws Exception
29 {
30 muleContext.getRegistry().registerObject("test", this);
31 }
32
33 public void testIBeanInjection() throws Exception {
34 assertNotNull(hostip);
35 String result = hostip.getHostInfo("192.215.42.198");
36 assertNotNull(result);
37 System.out.println(result);
38
39
40
41 assertTrue("has ip", hostip.hasIp("192.215.42.198"));
42 }
43 }