diff options
author | Jose <jose@zeroc.com> | 2018-06-01 17:41:03 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-06-01 17:41:03 +0200 |
commit | cbe92e540a7f02f0bdf93192424bd119189365b7 (patch) | |
tree | 411c50dc0ae9c669d31a940b1b4903b5deac4f12 /csharp/test/Ice/servantLocator/Server.cs | |
parent | Fixed Util.py check for binary installation directory on Windows (diff) | |
download | ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.bz2 ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.xz ice-cbe92e540a7f02f0bdf93192424bd119189365b7.zip |
Do not use Ice::Application for Ice testsuite
Diffstat (limited to 'csharp/test/Ice/servantLocator/Server.cs')
-rw-r--r-- | csharp/test/Ice/servantLocator/Server.cs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/csharp/test/Ice/servantLocator/Server.cs b/csharp/test/Ice/servantLocator/Server.cs index d411fb3cedc..b4b5f1e5fb6 100644 --- a/csharp/test/Ice/servantLocator/Server.cs +++ b/csharp/test/Ice/servantLocator/Server.cs @@ -16,26 +16,27 @@ using System.Reflection; [assembly: AssemblyDescription("Ice test")] [assembly: AssemblyCompany("ZeroC, Inc.")] -public class Server : TestCommon.Application +public class Server : Test.TestHelper { - public override int run(string[] args) + public override void run(string[] args) { - communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0)); - communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0"); + using(var communicator = initialize(ref args)) + { + communicator.getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0)); + communicator.getProperties().setProperty("Ice.Warn.Dispatch", "0"); - Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter"); - adapter.addServantLocator(new ServantLocatorI("category"), "category"); - adapter.addServantLocator(new ServantLocatorI(""), ""); - adapter.add(new TestI(), Ice.Util.stringToIdentity("asm")); - adapter.add(new TestActivationI(), Ice.Util.stringToIdentity("test/activation")); - adapter.activate(); - adapter.waitForDeactivate(); - return 0; + Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); + adapter.addServantLocator(new ServantLocatorI("category"), "category"); + adapter.addServantLocator(new ServantLocatorI(""), ""); + adapter.add(new TestI(), Ice.Util.stringToIdentity("asm")); + adapter.add(new TestActivationI(), Ice.Util.stringToIdentity("test/activation")); + adapter.activate(); + adapter.waitForDeactivate(); + } } public static int Main(string[] args) { - Server app = new Server(); - return app.runmain(args); + return Test.TestDriver.runTest<Server>(args); } } |