This project has retired. For details please refer to its Attic page.
UDDIServiceCacheTest xref
View Javadoc
1   /*
2    * Copyright 2001-2009 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *      http://www.apache.org/licenses/LICENSE-2.0
8    * 
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  package org.apache.juddi.v3.client.mapping;
16  
17  import java.net.BindException;
18  import java.net.URL;
19  
20  import org.junit.Ignore;
21  import org.junit.Test;
22  
23  /**
24   * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
25   */
26  public class UDDIServiceCacheTest {
27  	
28  	@Ignore
29  	@Test(expected=BindException.class)
30  	public void testPortTakenException() throws Throwable {
31  		
32  		try {
33  			String urlStr = "http://localhost:8080/subscriptionlistener_uddi_client";
34  			URL url = new URL(urlStr);
35  			URL url2 = new URL(url.getProtocol(),url.getHost(),url.getPort(),url.getFile());
36  //			String protocol = url.getProtocol();
37  //			String host = url.getHost();
38  //			String path = url.getPath();
39  			
40  			
41  			
42  			
43            
44  			System.out.println("");
45  			//UDDIServiceCache serviceCache = new UDDIServiceCache();
46  			
47  			
48  			//serviceCache.publishHttpCallbackEndpoint(new UDDIClientSubscriptionListenerImpl(),urlStr);
49  			
50  		} catch (Throwable e) {
51  			if (e.getCause() instanceof BindException) {
52  				throw e.getCause();
53  			}
54  		}
55  	}
56  	
57  	
58  }