summaryrefslogtreecommitdiff
path: root/csharp/test/Ice/exceptions/Client.cs
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-11-25 13:13:22 +0100
committerBenoit Foucher <benoit@zeroc.com>2016-11-25 13:13:22 +0100
commitdcdc32af1fced49d80a8ccd93230e15d91ab45d8 (patch)
treeeb69e2555fbd54496fce8a33f4dd610e1473ff51 /csharp/test/Ice/exceptions/Client.cs
parentC# IceSSL/configuration log expired certificate exceptions. (diff)
downloadice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.bz2
ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.xz
ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.zip
Refactored test scripts
Diffstat (limited to 'csharp/test/Ice/exceptions/Client.cs')
-rw-r--r--csharp/test/Ice/exceptions/Client.cs50
1 files changed, 14 insertions, 36 deletions
diff --git a/csharp/test/Ice/exceptions/Client.cs b/csharp/test/Ice/exceptions/Client.cs
index 5974abde6e0..660197e44cc 100644
--- a/csharp/test/Ice/exceptions/Client.cs
+++ b/csharp/test/Ice/exceptions/Client.cs
@@ -17,49 +17,27 @@ using System.Reflection;
[assembly: AssemblyDescription("Ice test")]
[assembly: AssemblyCompany("ZeroC, Inc.")]
-public class Client
+public class Client : TestCommon.Application
{
- private static int run(string[] args, Ice.Communicator communicator)
+ public override int run(string[] args)
{
- ThrowerPrx thrower = AllTests.allTests(communicator);
+ ThrowerPrx thrower = AllTests.allTests(this);
thrower.shutdown();
return 0;
}
- public static int Main(string[] args)
+ protected override Ice.InitializationData getInitData(ref string[] args)
{
- int status = 0;
- Ice.Communicator communicator = null;
-
- try
- {
- Ice.InitializationData initData = new Ice.InitializationData();
- initData.properties = Ice.Util.createProperties(ref args);
- initData.properties.setProperty("Ice.Warn.Connections", "0");
- initData.properties.setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
- initData.properties.setProperty("Ice.MessageSizeMax", "10"); // 10KB max
- communicator = Ice.Util.initialize(ref args, initData);
- status = run(args, communicator);
- }
- catch(Exception ex)
- {
- Console.WriteLine(ex);
- status = 1;
- }
-
- if(communicator != null)
- {
- try
- {
- communicator.destroy();
- }
- catch(Ice.LocalException ex)
- {
- Console.WriteLine(ex);
- status = 1;
- }
- }
+ Ice.InitializationData initData = base.getInitData(ref args);
+ initData.properties.setProperty("Ice.Warn.Connections", "0");
+ initData.properties.setProperty("TestAdapter.Endpoints", getTestEndpoint(initData.properties, 0) + ":udp");
+ initData.properties.setProperty("Ice.MessageSizeMax", "10"); // 10KB max
+ return initData;
+ }
- return status;
+ public static int Main(string[] args)
+ {
+ Client app = new Client();
+ return app.runmain(args);
}
}