internal static void oneways(TestCommon.Application app, Test.MyClassPrx p) { Ice.Communicator communicator = app.communicator(); p = Test.MyClassPrxHelper.uncheckedCast(p.ice_oneway()); { p.ice_ping(); } { p.opVoid(); } { p.opIdempotent(); } { p.opNonmutating(); } { byte b; try { p.opByte((byte)0xff, (byte)0x0f, out b); test(false); } catch (System.ArgumentException) { } } }
public static void allTests(TestCommon.Application app) { Ice.Communicator communicator = app.communicator(); string sref = "test:" + app.getTestEndpoint(0); Ice.ObjectPrx obj = communicator.stringToProxy(sref); test(obj != null); int proxyPort = communicator.getProperties().getPropertyAsInt("Ice.HTTPProxyPort"); if (proxyPort == 0) { proxyPort = communicator.getProperties().getPropertyAsInt("Ice.SOCKSProxyPort"); } Test.TestIntfPrx testPrx = Test.TestIntfPrxHelper.checkedCast(obj); test(testPrx != null); Write("testing connection... "); Flush(); { testPrx.ice_ping(); } WriteLine("ok"); Write("testing connection information... "); Flush(); { Ice.IPConnectionInfo info = getIPConnectionInfo(testPrx.ice_getConnection().getInfo()); test(info.remotePort == proxyPort); // make sure we are connected to the proxy port. } WriteLine("ok"); Write("shutting down server... "); Flush(); { testPrx.shutdown(); } WriteLine("ok"); Write("testing connection failure... "); Flush(); { try { testPrx.ice_ping(); test(false); } catch (Ice.LocalException) { } } WriteLine("ok"); }
public static Test.MyClassPrx allTests(TestCommon.Application app) { Ice.Communicator communicator = app.communicator(); Flush(); string rf = "test:" + app.getTestEndpoint(0); Ice.ObjectPrx baseProxy = communicator.stringToProxy(rf); Test.MyClassPrx cl = Test.MyClassPrxHelper.checkedCast(baseProxy); Test.MyDerivedClassPrx derivedProxy = Test.MyDerivedClassPrxHelper.checkedCast(cl); Write("testing twoway operations... "); Flush(); Twoways.twoways(app, cl); Twoways.twoways(app, derivedProxy); derivedProxy.opDerived(); WriteLine("ok"); Write("testing oneway operations... "); Flush(); Oneways.oneways(app, cl); WriteLine("ok"); Write("testing twoway operations with AMI... "); Flush(); TwowaysAMI.twowaysAMI(app, cl); TwowaysAMI.twowaysAMI(app, derivedProxy); WriteLine("ok"); Write("testing oneway operations with AMI... "); Flush(); OnewaysAMI.onewaysAMI(app, cl); WriteLine("ok"); Write("testing batch oneway operations... "); Flush(); BatchOneways.batchOneways(cl); BatchOneways.batchOneways(derivedProxy); WriteLine("ok"); Write("testing batch AMI oneway operations... "); Flush(); BatchOnewaysAMI.batchOneways(cl); BatchOnewaysAMI.batchOneways(derivedProxy); WriteLine("ok"); return(cl); }
public static Test.MyClassPrx allTests(TestCommon.Application app, bool collocated) { Ice.Communicator communicator = app.communicator(); Flush(); string rf = "test:" + app.getTestEndpoint(0); Ice.ObjectPrx baseProxy = communicator.stringToProxy(rf); Test.MyClassPrx cl = Test.MyClassPrxHelper.checkedCast(baseProxy); Write("testing twoway operations... "); Flush(); Twoways.twoways(communicator, cl); WriteLine("ok"); if (!collocated) { Write("testing twoway operations with AMI... "); Flush(); TwowaysAMI.twowaysAMI(communicator, cl); WriteLine("ok"); } return(cl); }