Ejemplo n.º 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");
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 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);
        }