问题描述
你能在单元测试和TDD至少有一些治疗Mock对象的recoment一书的C#?
Can you recoment a book on on Unit Testing and TDD for C# with at least some treatment of Mock Objects?
我已经看到了这问题,但它似乎并没有提及嘲讽。
I have seen this question but it does not seem to mention mocking.
推荐答案
单元测试的艺术:随着例子在.NET 的罗伊Osherove(的,官方网站)听起来像是你在找什么。他用了一个章节介绍存根和模仿对象的概念(使用滚你自己的方法),然后第二章中的使用mock对象框架,特别的。有是有点不太重视测试驱动开发,但有相当多的有关TDD从其他来源获得,而TDD是不是所有的特定语言。
The Art of Unit Testing: With Examples in .NET by Roy Osherove (Amazon Page, Official Site) sounds like what you're looking for. He devotes one chapter introducing the concepts of stub and mock objects (using a "roll-your-own" approach), and then a second chapter on using mock object frameworks, particularly Rhino Mocks. There is somewhat less emphasis on Test-Driven Development, but there is quite a lot of information about TDD available from other sources, and TDD isn't all that language-specific.
这篇关于什么书在TDD的C#与治疗嘲弄的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!