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: * @(#)TestDeploymentRegistry.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 java.util.List;
032:
033: import junit.framework.Test;
034: import junit.framework.TestCase;
035: import junit.framework.TestSuite;
036:
037: /**
038: * DOCUMENT ME!
039: *
040: * @author Sun Microsystems, Inc.
041: */
042: public class TestDeploymentRegistry extends TestCase {
043: /**
044: *
045: */
046: private DeploymentRegistry mRegistry;
047:
048: /**
049: *
050: */
051: private EndpointBean mEndpointBean;
052:
053: /**
054: * Creates a new TestDeploymentRegistry object.
055: *
056: * @param testName DOCUMENT ME!
057: */
058: public TestDeploymentRegistry(java.lang.String testName) {
059: super (testName);
060: }
061:
062: /**
063: * DOCUMENT ME!
064: *
065: * @return DOCUMENT ME!
066: */
067: public static Test suite() {
068: TestSuite suite = new TestSuite(TestDeploymentRegistry.class);
069:
070: return suite;
071: }
072:
073: /**
074: * Sets up tests.
075: */
076: public void setUp() {
077: mRegistry = DeploymentRegistry.getInstance();
078: mEndpointBean = new EndpointBean();
079: }
080:
081: /**
082: * Test of dump method, of class
083: * com.sun.jbi.binding.file.DeploymentRegistry.
084: */
085: public void testDump() {
086: System.out.println("testDump");
087: }
088:
089: /**
090: * Test of findEndpoint method, of class
091: * com.sun.jbi.binding.file.DeploymentRegistry.
092: */
093: public void testFindEndpoint() {
094: System.out.println("testFindEndpoint");
095: mRegistry.registerEndpoint("testendpoint", mEndpointBean);
096:
097: EndpointBean eb = mRegistry.findEndpoint("testendpoint");
098: assertNotNull("Endpoint Bean is Null ", eb);
099: }
100:
101: /**
102: * Test of getDeploymentStatus method, of class
103: * com.sun.jbi.binding.file.DeploymentRegistry.
104: */
105: public void testGetDeploymentStatus() {
106: System.out.println("testGetDeploymentStatus");
107: mEndpointBean.setDeploymentId("ASA1");
108: mRegistry.registerEndpoint("testendpoint", mEndpointBean);
109: assertEquals(true, mRegistry.getDeploymentStatus("ASA1"));
110: }
111:
112: /**
113: * Test of getEndpoints method, of class
114: * com.sun.jbi.binding.file.DeploymentRegistry.
115: */
116: public void testGetEndpoints() {
117: System.out.println("testGetEndpoints");
118: mEndpointBean.setDeploymentId("ASA1");
119: mRegistry.registerEndpoint("testendpoint", mEndpointBean);
120: assertNotNull(mRegistry.getEndpoints("ASA1"));
121: }
122:
123: /**
124: * Test of getInstance method, of class
125: * com.sun.jbi.binding.file.DeploymentRegistry.
126: */
127: public void testGetInstance() {
128: System.out.println("testGetInstance");
129: }
130:
131: /**
132: * Test of isDeployed method, of class
133: * com.sun.jbi.binding.file.DeploymentRegistry.
134: */
135: public void testIsDeployed() {
136: System.out.println("testIsDeployed");
137: mEndpointBean.setDeploymentId("ASA1");
138: mRegistry.registerEndpoint("testendpoint", mEndpointBean);
139: assertEquals(true, mRegistry.isDeployed("testendpoint"));
140: }
141:
142: /**
143: * Test of listAllServiceLists method, of class
144: * com.sun.jbi.binding.file.DeploymentRegistry.
145: */
146: public void testListAllServiceLists() {
147: System.out.println("testListAllServiceLists");
148: }
149:
150: /**
151: * Test of registerEndpoint method, of class
152: * com.sun.jbi.binding.file.DeploymentRegistry.
153: */
154: public void testRegisterEndpoint() {
155: System.out.println("testRegisterEndpoint");
156: mEndpointBean.setDeploymentId("ASA1");
157: mRegistry.registerEndpoint("testendpoint", mEndpointBean);
158: assertNotNull("Endpoint Bean is Null ", mRegistry
159: .getEndpoints("testendpoint"));
160: }
161:
162: /**
163: * Test of setComproot method, of class
164: * com.sun.jbi.binding.file.DeploymentRegistry.
165: */
166: public void testSetComproot() {
167: System.out.println("testSetComproot");
168: }
169: }
|