Beispiel #1
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);
        }
        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);
            
        }