001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)TestEndpointBean.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.binding.file;
030:
031: import junit.framework.Test;
032: import junit.framework.TestCase;
033: import junit.framework.TestSuite;
034:
035: /**
036: * DOCUMENT ME!
037: *
038: * @author Sun Microsystems, Inc.
039: */
040: public class TestEndpointBean extends TestCase {
041: /**
042: * Creates a new TestEndpointBean object.
043: */
044: private EndpointBean mEndpointBean;
045:
046: /**
047: * Creates a new TestEndpointBean object.
048: *
049: * @param testName DOCUMENT ME!
050: */
051: public TestEndpointBean(java.lang.String testName) {
052: super (testName);
053: }
054:
055: /**
056: * sets up test.
057: */
058: public void setUp() {
059: mEndpointBean = new EndpointBean();
060: }
061:
062: /**
063: * DOCUMENT ME!
064: *
065: * @return DOCUMENT ME!
066: */
067: public static Test suite() {
068: TestSuite suite = new TestSuite(TestEndpointBean.class);
069:
070: return suite;
071: }
072:
073: /**
074: * Test of getDeploymentId method, of class
075: * com.sun.jbi.binding.file.EndpointBean.
076: */
077: public void testGetDeploymentId() {
078: System.out.println("testGetDeploymentId");
079: mEndpointBean.setDeploymentId("123456");
080: assertEquals("Could not set/get deployment Id ", "123456",
081: mEndpointBean.getDeploymentId());
082: }
083:
084: /**
085: * Test of getUniqueName method, of class
086: * com.sun.jbi.binding.file.EndpointBean.
087: */
088: public void testGetUniqueName() {
089: System.out.println("testGetUniqueName");
090: mEndpointBean.setValue("service-local-name", new String(
091: "service1"));
092: mEndpointBean.setValue("service-namespace", new String(
093: "http://sun.com"));
094: mEndpointBean
095: .setValue("endpoint-name", new String("endpoint1"));
096: assertEquals("Could not set/get unique name",
097: "{http://sun.com}service1endpoint1", mEndpointBean
098: .getUniqueName());
099: }
100:
101: /**
102: * Test of getValue method, of class com.sun.jbi.binding.file.EndpointBean.
103: */
104: public void testGetValue() {
105: System.out.println("testGetValue");
106: mEndpointBean.setValue("MYVALUE", new String("myvalue"));
107: assertEquals("Could not set/get Value ", "myvalue",
108: mEndpointBean.getValue("MYVALUE"));
109: }
110: }
|