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.transport.tcp;
8   
9   import org.mule.api.endpoint.ImmutableEndpoint;
10  import org.mule.tck.junit4.AbstractMuleContextTestCase;
11  
12  import org.junit.Test;
13  
14  import static org.junit.Assert.assertEquals;
15  import static org.junit.Assert.assertNotNull;
16  
17  public class ConnectorFactoryTestCase extends AbstractMuleContextTestCase
18  {
19      @Test
20      public void testCreate() throws Exception
21      {
22          ImmutableEndpoint endpoint = 
23              muleContext.getEndpointFactory().getInboundEndpoint("tcp://7877");
24          assertNotNull(endpoint);
25          assertNotNull(endpoint.getConnector());
26          assertEquals("tcp://localhost:7877", endpoint.getEndpointURI().getAddress());
27      }
28  }