View Javadoc

1   /*
2    * $Id: AbstractEndpointTestCase.java 20385 2010-11-29 20:25:26Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.config.spring.parsers.endpoint;
12  
13  import org.mule.api.MuleException;
14  import org.mule.api.endpoint.EndpointURI;
15  import org.mule.api.endpoint.ImmutableEndpoint;
16  import org.mule.tck.FunctionalTestCase;
17  
18  public abstract class AbstractEndpointTestCase extends FunctionalTestCase
19  {
20  
21      public ImmutableEndpoint doTest(String name) throws MuleException
22      {
23          ImmutableEndpoint endpoint = muleContext.getEndpointFactory().getInboundEndpoint(name);
24          assertNotNull(endpoint);
25          EndpointURI uri = endpoint.getEndpointURI();
26          assertNotNull(uri);
27          assertEquals("foo", uri.getAddress());
28          assertEquals("test", uri.getScheme());
29          return endpoint;
30      }
31  
32  }