locked
NUnit RRS feed

  • Question

  • User-1754992715 posted

    Hi,

       i have design a class Employee as following

      class Employee

       public int m_sal;

       public  int m_Age;

      public void ShowData(Employee obj)

      {

         /// some statement here

      }

    }

    we want to write testcase for showData how to send the object inside TestCase.

    Thanks.......

    Tuesday, August 23, 2011 8:41 AM

Answers

  • User1957418580 posted

    I'm afraid that I don't have familiarity with nunit, and maybe someone from our community can help here, but you might get more assistance if you post your question to the nunit site for help.  Good luck!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 30, 2011 12:16 PM

All replies

  • User-963541686 posted

    you have to use the Mock object to create the test cases

    Refer the below links for more details

    http://devrants.blog.com/2010/04/28/sample-of-nunit-mock/

    http://www.zorched.net/2007/03/10/mocking-net-objects-with-nunit/

    Tuesday, August 23, 2011 1:28 PM
  • User-1754992715 posted

    Thank u Sir,

                       But both article is not according to my requirement as i mentioned above.

    Thanks......................

    Wednesday, August 24, 2011 1:45 AM
  • User1957418580 posted

    I'm afraid that I don't have familiarity with nunit, and maybe someone from our community can help here, but you might get more assistance if you post your question to the nunit site for help.  Good luck!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 30, 2011 12:16 PM
  • User-1754992715 posted

    thanks For Valueable suggestion

                                                      Sanjay Gupta

    Friday, September 2, 2011 1:24 AM