1 22 package org.objectweb.petals.jbi.component.context; 23 24 import javax.xml.namespace.QName ; 25 26 import junit.framework.TestCase; 27 28 import org.objectweb.petals.jbi.component.mock.MockComponentContext; 29 30 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 ( 49 "service"), "endpoint"); 50 fail(); 51 } catch (Exception e) { 52 } 54 } 55 56 public void testDeactivateEndpoint() { 57 try { 58 componentContextForInstallation.deactivateEndpoint(null); 59 fail(); 60 } catch (Exception e) { 61 } 63 } 64 65 public void testDeregisterExternalEndpoint() { 66 try { 67 componentContextForInstallation.deregisterExternalEndpoint(null); 68 fail(); 69 } catch (Exception e) { 70 } 72 } 73 74 public void testGetComponentName() { 75 try { 76 componentContextForInstallation.getComponentName(); 77 fail(); 78 } catch (Exception e) { 79 } 81 } 82 83 public void testGetDeliveryChannel() { 84 try { 85 componentContextForInstallation.getDeliveryChannel(); 86 fail(); 87 } catch (Exception e) { 88 } 90 } 91 92 public void testGetEndpoint() { 93 try { 94 componentContextForInstallation.getEndpoint(null, null); 95 fail(); 96 } catch (Exception e) { 97 } 99 } 100 101 public void testGetEndpointDescriptor() { 102 try { 103 componentContextForInstallation.getEndpointDescriptor(null); 104 fail(); 105 } catch (Exception e) { 106 } 108 } 109 110 public void testGetEndpoints() { 111 try { 112 componentContextForInstallation.getEndpoints(null); 113 fail(); 114 } catch (Exception e) { 115 } 117 } 118 119 public void testGetEndpointsForService() { 120 try { 121 componentContextForInstallation.getEndpointsForService(null); 122 fail(); 123 } catch (Exception e) { 124 } 126 } 127 128 public void testGetExternalEndpoints() { 129 try { 130 componentContextForInstallation.getExternalEndpoints(null); 131 fail(); 132 } catch (Exception e) { 133 } 135 } 136 137 public void testGetExternalEndpointsForService() { 138 try { 139 componentContextForInstallation 140 .getExternalEndpointsForService(null); 141 fail(); 142 } catch (Exception e) { 143 } 145 } 146 147 public void testGetLogger() { 148 try { 149 componentContextForInstallation.getLogger("test", "test"); 150 fail(); 151 } catch (Exception e) { 152 } 154 } 155 156 public void testGetWorkspaceRoot() { 157 try { 158 componentContextForInstallation.getWorkspaceRoot(); 159 fail(); 160 } catch (Exception e) { 161 } 163 } 164 165 public void testRegisterExternalEndpoint() { 166 try { 167 componentContextForInstallation.registerExternalEndpoint(null); 168 fail(); 169 } catch (Exception e) { 170 } 172 } 173 174 public void testResolveEndpointReference() { 175 try { 176 componentContextForInstallation.resolveEndpointReference(null); 177 fail(); 178 } catch (Exception e) { 179 } 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 |