I am novice to the Moq and unit testing. I have to write unit tests to a lot of classes which has the objects of other classes. can i mock the methods of the class objects. Here is the exact scenerio-
I have a class two classes A and B and A has a private object of B and in a method of A i am internally calling the method of B and then doing some calculation and returning the result. Can i mock the method of B in this scenerio? Please try to give me full detail about the conditions where i can mock the methods and functions of the class. Thanx