コード例 #1
0
ファイル: TestClient.cs プロジェクト: divyang4481/IIOPNet
        public void Test()
        {
            // to make sure, to use same channel, do everything in one test-method

            // without callback
            byte arg1    = 1;
            byte result1 = m_testService.TestIncByte(arg1);

            Assertion.AssertEquals("wrong result 1", ((System.Byte)arg1 + 1), result1);

            // for the following callbacks, should use already existing connection for callback (bidir)
            string       arg2     = "test";
            CallBackImpl echoImpl = new CallBackImpl();

            m_testService.string_callback(echoImpl, arg2);
            Assertion.AssertEquals("wrong result 2", arg2, echoImpl.Msg);

            int arg3 = 3;
            CallbackIntIncrementerImpl incImpl = new CallbackIntIncrementerImpl();

            m_testService.RegisterCallbackIntIncrementer(incImpl);
            int result3 = m_testService.IncrementWithCallbackIncrementer(arg3);

            Assertion.AssertEquals("wrong result 3", arg3 + 1, result3);
        }
コード例 #2
0
 public void TestWithCallback() {
     CallbackIntIncrementerImpl callback = new CallbackIntIncrementerImpl();
     m_testService.RegisterCallbackIntIncrementer(callback);
     
     System.Int32 arg = 1;
     System.Int32 result = m_testService.IncrementWithCallbackIncrementer(arg);
     Assert.AreEqual(arg + 1, result);
 }
コード例 #3
0
ファイル: TestClient.cs プロジェクト: divyang4481/IIOPNet
        public void TestWithCallback()
        {
            CallbackIntIncrementerImpl callback = new CallbackIntIncrementerImpl();

            m_testService.RegisterCallbackIntIncrementer(callback);

            System.Int32 arg    = 1;
            System.Int32 result = m_testService.IncrementWithCallbackIncrementer(arg);
            Assert.AreEqual(arg + 1, result);
        }
コード例 #4
0
        public void Test() {
            System.Byte arg = 1;
            System.Byte result = m_testService.TestIncByte(arg);
            Assert.AreEqual((System.Byte)(arg + 1), result);

            CallbackIntIncrementerImpl callback = new CallbackIntIncrementerImpl();
            m_testService.RegisterCallbackIntIncrementer(callback);
            
            System.Int32 arg1 = 1;
            System.Int32 result1 = m_testService.IncrementWithCallbackIncrementer(arg1);
            Assert.AreEqual((System.Int32)(arg1 + 1), result1);                
        }
コード例 #5
0
ファイル: TestClient.cs プロジェクト: divyang4481/IIOPNet
        public void Test()
        {
            System.Byte arg    = 1;
            System.Byte result = m_testService.TestIncByte(arg);
            Assert.AreEqual((System.Byte)(arg + 1), result);

            CallbackIntIncrementerImpl callback = new CallbackIntIncrementerImpl();

            m_testService.RegisterCallbackIntIncrementer(callback);

            RunMultithreaded(new PerformCallDelegate(this.RunTestWithCallback));
        }
コード例 #6
0
        public void Test()
        {
            System.Byte arg    = 1;
            System.Byte result = m_testService.TestIncByte(arg);
            Assert.AreEqual((System.Byte)(arg + 1), result);

            CallbackIntIncrementerImpl callback = new CallbackIntIncrementerImpl();

            m_testService.RegisterCallbackIntIncrementer(callback);

            System.Int32 arg1    = 1;
            System.Int32 result1 = m_testService.IncrementWithCallbackIncrementer(arg1);
            Assert.AreEqual((System.Int32)(arg1 + 1), result1);
        }
コード例 #7
0
        public void Test() {
            System.Byte arg = 1;
            System.Byte result = m_testService.TestIncByte(arg);
            Assert.AreEqual((System.Byte)(arg + 1), result);

            CallbackIntIncrementerImpl callback = new CallbackIntIncrementerImpl();
            m_testService.RegisterCallbackIntIncrementer(callback);

            RunMultithreaded(new PerformCallDelegate(this.RunTestWithCallback));            
        }
コード例 #8
0
        public void Test() {
            // to make sure, to use same channel, do everything in one test-method
            
            // without callback
            byte arg1 = 1;
            byte result1 = m_testService.TestIncByte(arg1);
            Assertion.AssertEquals("wrong result 1", ((System.Byte)arg1 + 1), result1);

            // for the following callbacks, should use already existing connection for callback (bidir)
            string arg2 = "test";
            CallBackImpl echoImpl = new CallBackImpl();
            m_testService.string_callback(echoImpl, arg2);
            Assertion.AssertEquals("wrong result 2", arg2, echoImpl.Msg);

            int arg3 = 3;
            CallbackIntIncrementerImpl incImpl = new CallbackIntIncrementerImpl();
            m_testService.RegisterCallbackIntIncrementer(incImpl);
            int result3 = m_testService.IncrementWithCallbackIncrementer(arg3);
            Assertion.AssertEquals("wrong result 3", arg3 + 1, result3);
            
        }