CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Threaded View

  1. #3
    Join Date
    Jun 2012
    Posts
    38

    Re: Unit-testing functions with user-defined types

    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
    Code:
    int foo(int i, char c){...;return 1;}
    then my test method is
    Code:
    TEST_METHOD(foo)
    {
          MyCls cls;
          Assert::AreEqual(1,cls.foo(1,'1'));
    }
    Last edited by terminalXXX; May 8th, 2013 at 08:07 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured