コード例 #1
0
 /**
  * Create an endpoint and check its properties.
  *
  * @throws Exception if something goes wrong
  */
 public void testValidEndpointURI() throws Exception {
   EndpointURI endpointUri =
       new MuleEndpointURI("legstar-wmq://CICS01.BRIDGE.REQUEST.QUEUE", muleContext);
   endpointUri.initialise();
   assertEquals("legstar-wmq", endpointUri.getScheme());
   assertEquals("legstar-wmq", endpointUri.getSchemeMetaInfo());
   assertEquals("CICS01.BRIDGE.REQUEST.QUEUE", endpointUri.getAddress());
 }
コード例 #2
0
 @Test
 public void testUrlWithProvider() throws Exception {
   EndpointURI url = new MuleEndpointURI("vm://some.queue?endpointName=vmProvider", muleContext);
   url.initialise();
   assertEquals(VMConnector.VM, url.getScheme());
   assertEquals("some.queue", url.getAddress());
   assertEquals("vmProvider", url.getEndpointName());
   assertEquals("vm://some.queue?endpointName=vmProvider", url.toString());
   assertEquals(1, url.getParams().size());
 }
コード例 #3
0
 /**
  * Get user/password from URI.
  *
  * @throws Exception if something goes wrong
  */
 public void testUserPasswordURI() throws Exception {
   EndpointURI endpointUri =
       new MuleEndpointURI("legstar-wmq://user:[email protected]", muleContext);
   endpointUri.initialise();
   assertEquals("legstar-wmq", endpointUri.getScheme());
   assertEquals("legstar-wmq", endpointUri.getSchemeMetaInfo());
   assertEquals("CICS01.BRIDGE.REQUEST.QUEUE", endpointUri.getAddress());
   assertEquals("user:password", endpointUri.getUserInfo());
   assertEquals("user", endpointUri.getUser());
   assertEquals("password", endpointUri.getPassword());
 }