Can Rhino Mocks Write My Expect Statements For Me?

2019-08-28 02:07发布

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.

标签: rhino-mocks
1条回答
Animai°情兽
2楼-- · 2019-08-28 02:49

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.

查看更多
登录 后发表回答