1 22 package org.objectweb.petals.jbi.registry; 23 24 import javax.xml.namespace.QName ; 25 26 import junit.framework.TestCase; 27 28 import org.objectweb.petals.jbi.registry.AbstractEndpoint.EndpointType; 29 30 35 public class LinkedEndpointTest extends TestCase { 36 37 public void testConstructor() { 38 LinkedEndpoint linkedEndpoint = new LinkedEndpoint(new QName ("test"), 39 "endpoint", new QName ("totest"), "toendpoint", null); 40 assertEquals(linkedEndpoint.getToEndpointName(), "toendpoint"); 41 linkedEndpoint.setToServiceName(new QName ("toservice")); 42 assertEquals(linkedEndpoint.getToServiceName(), new QName ("toservice")); 43 assertEquals(linkedEndpoint.getType(), EndpointType.LINKED); 44 } 45 46 public void testConstructor1() { 47 LinkedEndpoint linkedEndpoint = new LinkedEndpoint(new QName ( 48 "interface"), new QName ("test"), "endpoint", null); 49 assertEquals(linkedEndpoint.getInterfaces()[0], new QName ("interface")); 50 linkedEndpoint.setToEndpointName("toendpoint"); 51 assertEquals(linkedEndpoint.getToEndpointName(), "toendpoint"); 52 assertEquals(linkedEndpoint.getType(), EndpointType.LINKED); 53 } 54 } 55 | Popular Tags |