diff options
Diffstat (limited to 'csharp/test/Ice/servantLocator/AllTests.cs')
-rw-r--r-- | csharp/test/Ice/servantLocator/AllTests.cs | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/csharp/test/Ice/servantLocator/AllTests.cs b/csharp/test/Ice/servantLocator/AllTests.cs index add7e4d99d5..87ab72a0f1e 100644 --- a/csharp/test/Ice/servantLocator/AllTests.cs +++ b/csharp/test/Ice/servantLocator/AllTests.cs @@ -11,7 +11,7 @@ using System; using Test; using Ice; -public class AllTests : TestCommon.TestApp +public class AllTests : TestCommon.AllTests { public static void testExceptions(TestIntfPrx obj) { @@ -195,15 +195,16 @@ public class AllTests : TestCommon.TestApp } } - public static TestIntfPrx allTests(Ice.Communicator communicator) + public static TestIntfPrx allTests(TestCommon.Application app) { + Ice.Communicator communicator = app.communicator(); Write("testing stringToProxy... "); Flush(); - string @ref = "asm:default -p 12010"; + string @ref = "asm:" + app.getTestEndpoint(0); Ice.ObjectPrx @base = communicator.stringToProxy(@ref); test(@base != null); WriteLine("ok"); - + Write("testing checked cast... "); Flush(); TestIntfPrx obj = TestIntfPrxHelper.checkedCast(@base); @@ -215,7 +216,7 @@ public class AllTests : TestCommon.TestApp Flush(); try { - Ice.ObjectPrx o = communicator.stringToProxy("category/locate:default -p 12010"); + Ice.ObjectPrx o = communicator.stringToProxy("category/locate:" + app.getTestEndpoint(0)); o.ice_ids(); test(false); } @@ -230,7 +231,7 @@ public class AllTests : TestCommon.TestApp try { - Ice.ObjectPrx o = communicator.stringToProxy("category/finished:default -p 12010"); + Ice.ObjectPrx o = communicator.stringToProxy("category/finished:" + app.getTestEndpoint(0)); o.ice_ids(); test(false); } @@ -246,11 +247,11 @@ public class AllTests : TestCommon.TestApp Write("testing servant locator..."); Flush(); - @base = communicator.stringToProxy("category/locate:default -p 12010"); + @base = communicator.stringToProxy("category/locate:" + app.getTestEndpoint(0)); obj = TestIntfPrxHelper.checkedCast(@base); try { - TestIntfPrxHelper.checkedCast(communicator.stringToProxy("category/unknown:default -p 12010")); + TestIntfPrxHelper.checkedCast(communicator.stringToProxy("category/unknown:" + app.getTestEndpoint(0))); } catch(ObjectNotExistException) { @@ -259,20 +260,20 @@ public class AllTests : TestCommon.TestApp Write("testing default servant locator..."); Flush(); - @base = communicator.stringToProxy("anothercat/locate:default -p 12010"); + @base = communicator.stringToProxy("anothercat/locate:" + app.getTestEndpoint(0)); obj = TestIntfPrxHelper.checkedCast(@base); - @base = communicator.stringToProxy("locate:default -p 12010"); + @base = communicator.stringToProxy("locate:" + app.getTestEndpoint(0)); obj = TestIntfPrxHelper.checkedCast(@base); try { - TestIntfPrxHelper.checkedCast(communicator.stringToProxy("anothercat/unknown:default -p 12010")); + TestIntfPrxHelper.checkedCast(communicator.stringToProxy("anothercat/unknown:" + app.getTestEndpoint(0))); } catch(ObjectNotExistException) { } try { - TestIntfPrxHelper.checkedCast(communicator.stringToProxy("unknown:default -p 12010")); + TestIntfPrxHelper.checkedCast(communicator.stringToProxy("unknown:" + app.getTestEndpoint(0))); } catch(ObjectNotExistException) { @@ -281,14 +282,14 @@ public class AllTests : TestCommon.TestApp Write("testing locate exceptions... "); Flush(); - @base = communicator.stringToProxy("category/locate:default -p 12010"); + @base = communicator.stringToProxy("category/locate:" + app.getTestEndpoint(0)); obj = TestIntfPrxHelper.checkedCast(@base); testExceptions(obj); WriteLine("ok"); Write("testing finished exceptions... "); Flush(); - @base = communicator.stringToProxy("category/finished:default -p 12010"); + @base = communicator.stringToProxy("category/finished:" + app.getTestEndpoint(0)); obj = TestIntfPrxHelper.checkedCast(@base); testExceptions(obj); @@ -332,7 +333,7 @@ public class AllTests : TestCommon.TestApp Write("testing servant locator removal... "); Flush(); - @base = communicator.stringToProxy("test/activation:default -p 12010"); + @base = communicator.stringToProxy("test/activation:" + app.getTestEndpoint(0)); TestActivationPrx activation = TestActivationPrxHelper.checkedCast(@base); activation.activateServantLocator(false); try |