when I use moq for my database factory, do I need to moq ALL the methods or just the ones that will be called?
or is that the beauty of using moq, where I just have to add moq methods for the ones I will use?
when I use moq for my database factory, do I need to moq ALL the methods or just the ones that will be called?
or is that the beauty of using moq, where I just have to add moq methods for the ones I will use?
Just the ones you use.
This applies to most, if not all mocking/faking frameworks.
You don't even have to mock all of the methods that will be called, only the ones that have to return something or that you want confirmation that it was called.