View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.module.ibeans;
8   
9   import org.mule.api.endpoint.InboundEndpoint;
10  import org.mule.module.ibeans.annotations.AbstractIBeansTestCase;
11  import org.mule.transport.ibean.IBeansConnector;
12  
13  import org.junit.Test;
14  
15  import static org.junit.Assert.assertEquals;
16  import static org.junit.Assert.assertNotNull;
17  import static org.junit.Assert.assertTrue;
18  
19  public class IBeansConnectorFactoryTestCase extends AbstractIBeansTestCase
20  {
21      @Test
22      public void testCreateFromFactory() throws Exception
23      {
24          InboundEndpoint endpoint = muleContext.getEndpointFactory().getInboundEndpoint(getEndpointURI());
25          assertNotNull(endpoint);
26          assertNotNull(endpoint.getConnector());
27          assertTrue(endpoint.getConnector() instanceof IBeansConnector);
28          assertEquals(getEndpointURI(), endpoint.getEndpointURI().toString());
29      }
30  
31      public String getEndpointURI()
32      {
33          return "ibean://hostip.getHostInfo";
34      }
35  }