Beispiel #1
0
        public void testCallClientFromClientThrowEx()
        {
            log.info("testCallClientFromClientThrowEx(");


            BSkeleton_ClientIF partner = new MyClientIF_throwEx();

            BClient_Testser client2 = TestUtilsHttp.createClient();

            client2.addRemote(partner);

            client.ServerIF.SetPartner(partner);

            ClientIF partnerIF = client.ServerIF.GetPartner();

            try
            {
                partnerIF.IncrementInt(7);
            }
            catch (BException e)
            {
                TestUtils.assertEquals(log, "exception", exceptionCode, e.Code);
            }
            log.info(")testCallClientFromClientThrowEx");
        }
Beispiel #2
0
        public static BClient_Testser createClient(BWireFlags flags)
        {
            BClient_Testser client = null;

            try
            {
                ServicePointManager.DefaultConnectionLimit = 1000;


                BWire             wire             = new HWireClient(url, flags, 120);
                BTransportFactory transportFactory = new HTransportFactoryClient(BApiDescriptor_Testser.instance, wire, 1);

                client = BClient_Testser.createClient(transportFactory);

                BSyncResult <bool> syncResult = new BSyncResult <bool>();
                client.start(BAsyncResultHelper.ToDelegate(syncResult));

                syncResult.GetResult();
            }
            catch (Exception e)
            {
                Assert.Fail(e.ToString());
            }

            return(client);
        }
Beispiel #3
0
        public void testPutStreamFromClientToClient()
        {
            log.info("testPutStreamFromClientToClient(");

            // Interface implementation for the second client
            BSkeleton_ClientIF partner = new ClientIF_putStreams();

            // Create second client
            BClient_Testser client2 = TestUtilsHttp.createClient();

            client2.addRemote(partner);

            // Pass the interface of the second client to the server side of the first client
            client.ServerIF.SetPartner(partner);

            // First client queries the interface of the second client from the server side
            ClientIF partnerIF = client.ServerIF.GetPartner();

            for (int i = 0; i < 1; i++)
            {
                log.info("call client...");
                IList <Stream> arr = TestUtilsHttp.makeTestStreams();
                partnerIF.PutStreams(arr, 0);
                log.info("call client OK");
            }

            client2.done();

            log.info(")testPutStreamFromClientToClient");
        }
        public void setUp()
        {
            BClient_Testser client1 = TestUtilsHttp.createClient();

            client1.RemoteWithAuthentication.SetUseAuthentication(true);
            client1.done();

            client = TestUtilsHttp.createClient();
            remote = client.RemoteWithAuthentication;
        }
Beispiel #5
0
        public void testCallClientFromClient()
        {
            log.info("testCallClientFromClient(");

            BSkeleton_ClientIF partner = new MyClientIF_withIncrementInt();

            BClient_Testser client2 = TestUtilsHttp.createClient();

            client2.addRemote(partner);

            client.ServerIF.SetPartner(partner);

            ClientIF partnerIF = client.ServerIF.GetPartner();
            int      r         = partnerIF.IncrementInt(7);

            TestUtils.assertEquals(log, "incrementInt", 8, r);

            log.info(")testCallClientFromClient");
        }
Beispiel #6
0
        public void testReturnStreamFromClientToClient()
        {
            log.info("testReturnStreamFromClientToClient(");

            // Interface implementation for the second client
            BSkeleton_ClientIF partner = new MyClientIF_getStreams();

            // Create second client
            BClient_Testser client2 = TestUtilsHttp.createClient();

            client2.addRemote(partner);

            // Pass the interface of the second client to the server side of the first client
            client.ServerIF.SetPartner(partner);

            // First client queries the interface of the second client from the server side
            ClientIF partnerIF = client.ServerIF.GetPartner();

            log.info("call client...");
            IList <Stream> arrR = partnerIF.GetStreams(0);

            log.info("call client OK");

            List <Stream> arr = TestUtilsHttp.makeTestStreams();

            TestUtils.assertEquals(log, "streams.length", arr.Count, arrR.Count);
            for (int i = 0; i < arr.Count; i++)
            {
                TestUtils.assertEquals(log, "stream[" + i + "]", arr[i], arrR[i]);
            }

            client2.done();


            log.info(")testReturnStreamFromClientToClient");
        }
Beispiel #7
0
 public void setUp()
 {
     client = TestUtilsHttp.createClient(BWireFlags.GZIP);
     remote = client.RemoteMapTypes;
 }
Beispiel #8
0
 public void setUp()
 {
     client = TestUtilsHttp.createClient();
     remote = client.ServerIF;
 }
Beispiel #9
0
 public void setUp()
 {
     client = TestUtilsHttp.createClient();
     remote = client.RemoteStreams;
 }
Beispiel #10
0
 public void setUp()
 {
     client = TestUtilsHttp.createClient();
     remote = client.RemotePrimitiveTypes;
 }
Beispiel #11
0
 public void setUp()
 {
     client = TestUtilsHttp.createClient();
 }