summaryrefslogtreecommitdiff
path: root/csharp/test/Ice/servantLocator/Server.cs
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-07-20 19:19:30 +0200
committerJose <jose@zeroc.com>2018-07-20 19:19:30 +0200
commitf831849a119aa592d207fd38428517b414c2b39d (patch)
tree88c4d1c69072ad45eda621079f0d1d8b89a1fd8e /csharp/test/Ice/servantLocator/Server.cs
parentUpdate Travis CI build to use ubuntu-18.04 (diff)
downloadice-f831849a119aa592d207fd38428517b414c2b39d.tar.bz2
ice-f831849a119aa592d207fd38428517b414c2b39d.tar.xz
ice-f831849a119aa592d207fd38428517b414c2b39d.zip
Xamarin testsuite
Diffstat (limited to 'csharp/test/Ice/servantLocator/Server.cs')
-rw-r--r--csharp/test/Ice/servantLocator/Server.cs52
1 files changed, 27 insertions, 25 deletions
diff --git a/csharp/test/Ice/servantLocator/Server.cs b/csharp/test/Ice/servantLocator/Server.cs
index b4b5f1e5fb6..7a1de5ad03e 100644
--- a/csharp/test/Ice/servantLocator/Server.cs
+++ b/csharp/test/Ice/servantLocator/Server.cs
@@ -7,36 +7,38 @@
//
// **********************************************************************
-using System;
-using System.Reflection;
+using Test;
-[assembly: CLSCompliant(true)]
-
-[assembly: AssemblyTitle("IceTest")]
-[assembly: AssemblyDescription("Ice test")]
-[assembly: AssemblyCompany("ZeroC, Inc.")]
-
-public class Server : Test.TestHelper
+namespace Ice
{
- public override void run(string[] args)
+ namespace servantLocator
{
- using(var communicator = initialize(ref args))
+ public class Server : TestHelper
{
- communicator.getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
- communicator.getProperties().setProperty("Ice.Warn.Dispatch", "0");
+ public override void run(string[] args)
+ {
+ var properties = createTestProperties(ref args);
+ properties.setProperty("Ice.Package.Test", "Ice.servantLocator");
+ using(var communicator = initialize(properties))
+ {
+ 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();
- }
- }
+ var 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();
+ serverReady();
+ adapter.waitForDeactivate();
+ }
+ }
- public static int Main(string[] args)
- {
- return Test.TestDriver.runTest<Server>(args);
+ public static int Main(string[] args)
+ {
+ return TestDriver.runTest<Server>(args);
+ }
+ }
}
}