Now I hava a class A to be tested. When I test a method(called Amethod) of A, Amethod will invoke another method(called Bmethod) of class B. And in this method of B, Bmethod will invoke a method of a interface C. It just likes a dependency tree:
A->B->C
I am using the gmock to do the unit test of Amethod of class A. Which one I should mock, B or C?
Aucun commentaire:
Enregistrer un commentaire