I have a function in my service layer whose output needs to be mocked.
it takes in a FinanceAccount object and returns a List the function uses the FinanceAccount object to create a DetachtedCreteria. and fetch a List.How can I SetUp this function so that it returns separate Lists for 3 开发者_如何学运维three different FinanceAccount objects.
I am using Moq.
Found that the design of the service layer being tested was wrong. each part of the servicer layer should have been created with unit tests in mind.rather than refactoring tests after the code was written.
精彩评论