diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-11-25 13:13:22 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-11-25 13:13:22 +0100 |
commit | dcdc32af1fced49d80a8ccd93230e15d91ab45d8 (patch) | |
tree | eb69e2555fbd54496fce8a33f4dd610e1473ff51 /csharp/test/Ice/servantLocator/Server.cs | |
parent | C# IceSSL/configuration log expired certificate exceptions. (diff) | |
download | ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.bz2 ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.xz ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.zip |
Refactored test scripts
Diffstat (limited to 'csharp/test/Ice/servantLocator/Server.cs')
-rw-r--r-- | csharp/test/Ice/servantLocator/Server.cs | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/csharp/test/Ice/servantLocator/Server.cs b/csharp/test/Ice/servantLocator/Server.cs index 59d8df36ccd..8529bfabcdc 100644 --- a/csharp/test/Ice/servantLocator/Server.cs +++ b/csharp/test/Ice/servantLocator/Server.cs @@ -16,29 +16,26 @@ using System.Reflection; [assembly: AssemblyDescription("Ice test")] [assembly: AssemblyCompany("ZeroC, Inc.")] -public class Server +public class Server : TestCommon.Application { - internal class App : Ice.Application + public override int run(string[] args) { - public override int run(string[] args) - { - communicator().getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010"); - communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0"); + 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(); + return 0; } public static int Main(string[] args) { - App app = new App(); - return app.main(args); + Server app = new Server(); + return app.runmain(args); } } |