Thank you, the only weird thing is I could not find any tutorials or example code to do what you suggested me. Are there any underlying claims for *never* mocking user-defined, COM related functions ? Because if this is a must-do thing in unit tests, there should be questions or source code I could google out.
Would you mind providing me a wrapper class you have dealt with to unit-test any COM functions or those with COM related arguments ?
I can only do simple things like this
for a function
then my test method isCode:int foo(int i, char c){...;return 1;}
Code:TEST_METHOD(foo) { MyCls cls; Assert::AreEqual(1,cls.foo(1,'1')); }




Reply With Quote