开发者

Creating a Mock DetactedCreteria Object

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜