Can Rhino Mocks Write My Expect Statements For Me? [closed]

落花浮王杯 提交于 2019-12-24 18:18:09

问题


I have a set of Visual Studio Team System unit (integration really) tests that talk to a remote database. The tests are getting too slow and unwieldy. I'd like to replace the entire set of tests with mocked out versions. The problem is it's painful to write all the expect statements that mimic what an entire database does.

Does anyone know of a tool or add-on that will run an existing test, figure out what the non-mocked version actually returns and write out the Expect.Call's to duplicate the functionality? I know this is a long shot, but I feel like it should be possible.


回答1:


Ok, I ended up writing it myself. Here is the blog post overview:

Write My Rhino Mocks Expect Statement

And here is the CodePlex project:

WriteMyExpectStatement

Hope this helps someone somewhere.



来源:https://stackoverflow.com/questions/218180/can-rhino-mocks-write-my-expect-statements-for-me

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!