KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > jbi > component > context > ComponentContextForInstallationTest


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: ComponentContextForInstallationTest.java 11:32:10 AM ddesjardins $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.jbi.component.context;
23
24 import javax.xml.namespace.QName JavaDoc;
25
26 import junit.framework.TestCase;
27
28 import org.objectweb.petals.jbi.component.mock.MockComponentContext;
29
30 /**
31  * Test of the ComponentContextForInstallation
32  *
33  * @author ddesjardins - eBMWebsourcing
34  */

35 public class ComponentContextForInstallationTest extends TestCase {
36     private ComponentContextForInstallation componentContextForInstallation;
37
38     private MockComponentContext componentContext;
39
40     public void setUp() {
41         componentContext = new MockComponentContext();
42         componentContextForInstallation = new ComponentContextForInstallation(
43             componentContext);
44     }
45
46     public void testActivateEndpoint() {
47         try {
48             componentContextForInstallation.activateEndpoint(new QName JavaDoc(
49                 "service"), "endpoint");
50             fail();
51         } catch (Exception JavaDoc e) {
52             // Do nothing
53
}
54     }
55
56     public void testDeactivateEndpoint() {
57         try {
58             componentContextForInstallation.deactivateEndpoint(null);
59             fail();
60         } catch (Exception JavaDoc e) {
61             // Do nothing
62
}
63     }
64
65     public void testDeregisterExternalEndpoint() {
66         try {
67             componentContextForInstallation.deregisterExternalEndpoint(null);
68             fail();
69         } catch (Exception JavaDoc e) {
70             // Do nothing
71
}
72     }
73
74     public void testGetComponentName() {
75         try {
76             componentContextForInstallation.getComponentName();
77             fail();
78         } catch (Exception JavaDoc e) {
79             // Do nothing
80
}
81     }
82
83     public void testGetDeliveryChannel() {
84         try {
85             componentContextForInstallation.getDeliveryChannel();
86             fail();
87         } catch (Exception JavaDoc e) {
88             // Do nothing
89
}
90     }
91
92     public void testGetEndpoint() {
93         try {
94             componentContextForInstallation.getEndpoint(null, null);
95             fail();
96         } catch (Exception JavaDoc e) {
97             // Do nothing
98
}
99     }
100
101     public void testGetEndpointDescriptor() {
102         try {
103             componentContextForInstallation.getEndpointDescriptor(null);
104             fail();
105         } catch (Exception JavaDoc e) {
106             // Do nothing
107
}
108     }
109
110     public void testGetEndpoints() {
111         try {
112             componentContextForInstallation.getEndpoints(null);
113             fail();
114         } catch (Exception JavaDoc e) {
115             // Do nothing
116
}
117     }
118
119     public void testGetEndpointsForService() {
120         try {
121             componentContextForInstallation.getEndpointsForService(null);
122             fail();
123         } catch (Exception JavaDoc e) {
124             // Do nothing
125
}
126     }
127
128     public void testGetExternalEndpoints() {
129         try {
130             componentContextForInstallation.getExternalEndpoints(null);
131             fail();
132         } catch (Exception JavaDoc e) {
133             // Do nothing
134
}
135     }
136
137     public void testGetExternalEndpointsForService() {
138         try {
139             componentContextForInstallation
140                 .getExternalEndpointsForService(null);
141             fail();
142         } catch (Exception JavaDoc e) {
143             // Do nothing
144
}
145     }
146
147     public void testGetLogger() {
148         try {
149             componentContextForInstallation.getLogger("test", "test");
150             fail();
151         } catch (Exception JavaDoc e) {
152             // Do nothing
153
}
154     }
155
156     public void testGetWorkspaceRoot() {
157         try {
158             componentContextForInstallation.getWorkspaceRoot();
159             fail();
160         } catch (Exception JavaDoc e) {
161             // Do nothing
162
}
163     }
164
165     public void testRegisterExternalEndpoint() {
166         try {
167             componentContextForInstallation.registerExternalEndpoint(null);
168             fail();
169         } catch (Exception JavaDoc e) {
170             // Do nothing
171
}
172     }
173
174     public void testResolveEndpointReference() {
175         try {
176             componentContextForInstallation.resolveEndpointReference(null);
177             fail();
178         } catch (Exception JavaDoc e) {
179             // Do nothing
180
}
181     }
182
183     public void testGetInstallRoot() {
184         assertEquals(componentContextForInstallation.getInstallRoot(), "root");
185     }
186
187     public void testGetMBeanNames() {
188         componentContextForInstallation.getMBeanNames();
189         assertTrue(componentContext.isGetMBeanNames());
190     }
191
192     public void testGetMBeanServer() {
193         componentContextForInstallation.getMBeanServer();
194         assertTrue(componentContext.isGetMBeanServer());
195     }
196
197     public void testGetTransactionManager() {
198         componentContextForInstallation.getTransactionManager();
199         assertTrue(componentContext.isGetTransactionManager());
200     }
201
202     public void testGetNamingContext() {
203         componentContextForInstallation.getNamingContext();
204         assertTrue(componentContext.isGetNamingContext());
205     }
206
207 }
208
Popular Tags