Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Creating mock for funcitons of unrelated clas

Help
2011-12-22
2013-05-14
  • Vishal Kaushik
    Vishal Kaushik
    2011-12-22

    Hi,

    I have a class A , under class A , there is one object of Class B is created as private member of A. Now in some public functions of Class A, some functions of Class B are called . Now I want to make mock object of Class B to test Class A funcitonality . Condition is , we dont want to change Class A, so how to create mock objects of Class B ? how to test Class A??