From: Steve L. <st...@us...> - 2005-09-21 13:19:08
|
Update of /cvsroot/smartfrog/core/components/deployapi/test/org/smartfrog/services/deployapi/test/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16919/components/deployapi/test/org/smartfrog/services/deployapi/test/system Modified Files: ApiTestBase.java ConsoleTestBase.java Log Message: moved a lot of CDDLM stuff, it is now compiling. next comes testing... Index: ConsoleTestBase.java =================================================================== RCS file: /cvsroot/smartfrog/core/components/deployapi/test/org/smartfrog/services/deployapi/test/system/ConsoleTestBase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConsoleTestBase.java 20 Sep 2005 17:07:05 -0000 1.1 --- ConsoleTestBase.java 21 Sep 2005 13:18:59 -0000 1.2 *************** *** 34,39 **** import org.smartfrog.services.deployapi.system.Constants; ! import org.smartfrog.services.deployapi.system.DeployApiConstants; ! import org.smartfrog.services.deployapi.client.PortalBinding; import org.smartfrog.services.deployapi.client.ConsoleOperation; import org.apache.axis2.AxisFault; --- 34,38 ---- import org.smartfrog.services.deployapi.system.Constants; ! import org.smartfrog.services.deployapi.client.PortalEndpointer; import org.smartfrog.services.deployapi.client.ConsoleOperation; import org.apache.axis2.AxisFault; *************** *** 52,56 **** public static final String PATH = PREFIX + "path"; ! private PortalBinding binding; private StringWriter outputWriter = new StringWriter(); --- 51,55 ---- public static final String PATH = PREFIX + "path"; ! private PortalEndpointer portal; private StringWriter outputWriter = new StringWriter(); *************** *** 82,86 **** } URL url = new URL(Constants.DEFAULT_PROTOCOL, host, port, path); ! binding = new PortalBinding(url); } --- 81,85 ---- } URL url = new URL(Constants.DEFAULT_PROTOCOL, host, port, path); ! portal = new PortalEndpointer(url); } *************** *** 91,100 **** * @throws java.io.IOException */ ! protected PortalBinding bindToInvalidHost() throws IOException { URL url = new URL(Constants.DEFAULT_PROTOCOL, "invalid-host", Constants.DEFAULT_SERVICE_PORT, Constants.DEFAULT_PATH); ! return new PortalBinding(url); } --- 90,99 ---- * @throws java.io.IOException */ ! protected PortalEndpointer bindToInvalidHost() throws IOException { URL url = new URL(Constants.DEFAULT_PROTOCOL, "invalid-host", Constants.DEFAULT_SERVICE_PORT, Constants.DEFAULT_PATH); ! return new PortalEndpointer(url); } *************** *** 154,159 **** * @return */ ! public PortalBinding getBinding() { ! return binding; } --- 153,158 ---- * @return */ ! public PortalEndpointer getBinding() { ! return portal; } *************** *** 228,233 **** public void assertNoSuchApplication(URI uri, String errorText) throws RemoteException { try { ! ApplicationStatusType status = getOperation() .lookupApplicationStatus(uri); } catch (AxisFault fault) { --- 227,233 ---- public void assertNoSuchApplication(URI uri, String errorText) throws RemoteException { + /* try { ! SystemStatus status = getOperation() .lookupApplicationStatus(uri); } catch (AxisFault fault) { *************** *** 236,239 **** --- 236,240 ---- errorText); } + */ } } Index: ApiTestBase.java =================================================================== RCS file: /cvsroot/smartfrog/core/components/deployapi/test/org/smartfrog/services/deployapi/test/system/ApiTestBase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ApiTestBase.java 20 Sep 2005 17:07:05 -0000 1.1 --- ApiTestBase.java 21 Sep 2005 13:18:59 -0000 1.2 *************** *** 24,29 **** --- 24,32 ---- import org.apache.axis2.AxisFault; import org.smartfrog.services.deployapi.client.ConsoleOperation; + import org.smartfrog.services.deployapi.client.Deploy; + import org.smartfrog.services.deployapi.client.SystemEndpointer; import org.smartfrog.services.deployapi.system.Constants; import org.ggf.xbeans.cddlm.api.DescriptorType; + import org.ggf.xbeans.cddlm.api.OptionMapType; import javax.xml.namespace.QName; *************** *** 69,74 **** String search) throws Exception { ! DeploymentDescriptorTypeBody body = dt.getBody(); assertNotNull("data null", body); final org.apache.axis.message.MessageElement[] any = body.get_any(); assertNotNull("data/any null", any); --- 72,79 ---- String search) throws Exception { ! DescriptorType.Body body = dt.getBody(); assertNotNull("data null", body); + //tODO/ + /* final org.apache.axis.message.MessageElement[] any = body.get_any(); assertNotNull("data/any null", any); *************** *** 76,88 **** String output = any[0].getAsString(); assertInText(output, search); } ! protected URI deploy(String name, DescriptorType descriptor, ! OptionsType options, NotificationInformationType callback) throws RemoteException { ! URI uri = operation.deploy(name, descriptor, options, callback); ! assertNotNull("uri", uri); ! return uri; } --- 81,93 ---- String output = any[0].getAsString(); assertInText(output, search); + */ } ! protected SystemEndpointer deploy(String name, DescriptorType descriptor, ! OptionMapType options) throws RemoteException { ! SystemEndpointer systemEndpointer = operation.deploy(null,descriptor, options); ! return systemEndpointer; } *************** *** 90,109 **** * deploy, expecting some kind of fault * - * @param name * @param dd * @param options - * @param callback * @param fault * @param text * @throws java.rmi.RemoteException */ ! protected void deployExpectingFault(final String name, ! DescriptorType dd, ! final OptionsType options, ! NotificationInformationType callback, final QName fault, final String text) throws RemoteException { try { ! URI uri = deploy(name, dd, options, callback); } catch (AxisFault af) { assertFaultMatches(af, fault, text); --- 95,111 ---- * deploy, expecting some kind of fault * * @param dd * @param options * @param fault * @param text * @throws java.rmi.RemoteException */ ! protected void deployExpectingFault(DescriptorType dd, ! final OptionMapType options, ! final QName fault, final String text) throws RemoteException { try { ! deploy(null, dd, options); } catch (AxisFault af) { assertFaultMatches(af, fault, text); *************** *** 118,128 **** * @throws java.rmi.RemoteException */ ! public void assertInState(URI uri, String stateName) throws RemoteException { ! ApplicationStatusType status = operation.lookupApplicationStatus(uri); assertNotNull("app status of " + uri, status); Constants.LifecycleStateEnum state = status.getState(); String currentState = state.getValue(); assertEquals(stateName, currentState); } --- 120,132 ---- * @throws java.rmi.RemoteException */ ! public void assertInState(SystemEndpointer system, String stateName) throws RemoteException { ! /* ! ApplicationStatusType status = operation.lookupApplicationStatus(system); assertNotNull("app status of " + uri, status); Constants.LifecycleStateEnum state = status.getState(); String currentState = state.getValue(); assertEquals(stateName, currentState); + */ } *************** *** 130,151 **** * undeploy something * ! * @param uri * @return * @throws java.rmi.RemoteException */ ! public boolean undeploy(URI uri) throws RemoteException { ! return operation.terminate(uri, UNDEPLOY_REASON); } ! public void assertDeployed(URI uri) throws RemoteException { ! assertInState(uri, Constants.STATE_RUNNING); } ! protected URI deploy(DescriptorType dt) throws RemoteException { ! URI uri; ! uri = deploy(null, dt, null, null); ! return uri; } ! protected DescriptorType createSimpleDescriptor() throws IOException { --- 134,154 ---- * undeploy something * ! * @param system * @return * @throws java.rmi.RemoteException */ ! public void undeploy(SystemEndpointer system) throws RemoteException { ! operation.terminate(system, UNDEPLOY_REASON); } ! public void assertDeployed(SystemEndpointer system) throws RemoteException { ! assertInState(system, Constants.STATE_RUNNING); } ! protected SystemEndpointer deploy(DescriptorType dt) throws RemoteException { ! SystemEndpointer systemEndpointer = deploy(null, dt, null); ! return systemEndpointer; } ! /* protected DescriptorType createSimpleDescriptor() throws IOException { *************** *** 153,156 **** DeploySmartFrogTest.SIMPLE_DESCRIPTOR); return dt; ! } } --- 156,159 ---- DeploySmartFrogTest.SIMPLE_DESCRIPTOR); return dt; ! }*/ } |