Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一组与远程数据库对话的 Visual Studio Team System 单元(真正的集成)测试。测试变得太慢和笨重。我想用模拟版本替换整个测试集。问题是编写所有模仿整个数据库的期望语句是很痛苦的。
有谁知道将运行现有测试的工具或附加组件,找出非模拟版本实际返回的内容并写出 Expect.Call 以复制功能?我知道这是一个很长的机会,但我觉得这应该是可能的。
好的,最后我自己写了。这是博客文章概述:
写我的犀牛模拟期望声明
这是 CodePlex 项目:
写我的期望语句
希望这可以帮助某个地方的人。