1
2
3
4
5
6
7
8
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.junit4.FunctionalTestCase;
17
18 import static org.junit.Assert.assertEquals;
19 import static org.junit.Assert.assertNotNull;
20
21 public abstract class AbstractEndpointTestCase extends FunctionalTestCase
22 {
23
24 public ImmutableEndpoint doTest(String name) throws MuleException
25 {
26 ImmutableEndpoint endpoint = muleContext.getEndpointFactory().getInboundEndpoint(name);
27 assertNotNull(endpoint);
28 EndpointURI uri = endpoint.getEndpointURI();
29 assertNotNull(uri);
30 assertEquals("foo", uri.getAddress());
31 assertEquals("test", uri.getScheme());
32 return endpoint;
33 }
34
35 }