示例#1
0
        public static async Task RunAsync(TestHelper helper, bool collocated)
        {
            Communicator communicator = helper.Communicator;
            TextWriter   output       = helper.Output;

            var cl = IMyClassPrx.Parse(helper.GetTestProxy("test", 0), communicator);

            output.Write("testing twoway operations... ");
            output.Flush();
            Twoways.Run(communicator, cl);
            output.WriteLine("ok");

            if (!collocated)
            {
                output.Write("testing twoway operations with AMI... ");
                output.Flush();
                TwowaysAMI.Run(communicator, cl);
                output.WriteLine("ok");
            }

            output.Write("shutting down server... ");
            output.Flush();
            await cl.ShutdownAsync();

            output.WriteLine("ok");
        }
示例#2
0
文件: AllTests.cs 项目: keno1213/ice
        public static IMyClassPrx Run(TestHelper helper, bool collocated)
        {
            Communicator?communicator = helper.Communicator;

            TestHelper.Assert(communicator != null);
            TextWriter output = helper.Output;
            var        cl     = IMyClassPrx.Parse(helper.GetTestProxy("test", 0), communicator);

            output.Write("testing twoway operations... ");
            output.Flush();
            Twoways.Run(communicator, cl);
            output.WriteLine("ok");

            if (!collocated)
            {
                output.Write("testing twoway operations with AMI... ");
                output.Flush();
                TwowaysAMI.Run(communicator, cl);
                output.WriteLine("ok");
            }
            return(cl);
        }
示例#3
0
        public static IMyClassPrx allTests(TestHelper helper, bool collocated)
        {
            var communicator = helper.Communicator();

            TestHelper.Assert(communicator != null);
            var output = helper.GetWriter();
            var cl     = IMyClassPrx.Parse($"test:{helper.GetTestEndpoint(0)}", communicator);

            output.Write("testing twoway operations... ");
            output.Flush();
            Twoways.twoways(communicator, cl);
            output.WriteLine("ok");

            if (!collocated)
            {
                output.Write("testing twoway operations with AMI... ");
                output.Flush();
                TwowaysAMI.twowaysAMI(communicator, cl);
                output.WriteLine("ok");
            }
            return(cl);
        }