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 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); }
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); }
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)); }