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??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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??