Proper way to Mock repository objects for unit tests using Moq and Unity
At my job we are using Moq for mocking and Unity for an IOC container. I am fairly new to this and do not have many resources at work to help me out with determining the best practices I should use. Right now, I have a group of repository interfaces (Ex: IRepository1, IRepository2... IRepository4) that a particular process needs to use to do its job. In the actual code I can determine all of the IRepository objects by using the IOC container and using the RegisterType() method. I am trying to figure out the best way to be able to test the method that needs the 4 mentioned repositories. I was