什么关于 C# 的 TDD 和 Mocks 处理的书

0

本文介绍了什么关于 C# 的 TDD 和 Mocks 处理的书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

您能否推荐一本关于 C# 的单元测试和 TDD 的书,其中至少对 Mock 对象进行了一些处理?

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 中的示例 作者:Roy Osherove (亚马逊页面, 官方网站) 听起来像你要找的东西.他用一章介绍存根和模拟对象的概念(使用自己动手"的方法),然后用第二章介绍使用模拟对象框架,特别是 Rhino Mocks.对测试驱动开发的重视程度稍低,但可以从其他来源获得大量有关 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.

这篇关于什么关于 C# 的 TDD 和 Mocks 处理的书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

C# 中的多播委托奇怪行为?
Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)...
2023-11-11 C#/.NET开发问题
6

参数计数与调用不匹配?
Parameter count mismatch with Invoke?(参数计数与调用不匹配?)...
2023-11-11 C#/.NET开发问题
26

如何将代表存储在列表中
How to store delegates in a List(如何将代表存储在列表中)...
2023-11-11 C#/.NET开发问题
6

代表如何工作(在后台)?
How delegates work (in the background)?(代表如何工作(在后台)?)...
2023-11-11 C#/.NET开发问题
5

没有 EndInvoke 的 C# 异步调用?
C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)...
2023-11-11 C#/.NET开发问题
2

Delegate.CreateDelegate() 和泛型:错误绑定到目标方法
Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)...
2023-11-11 C#/.NET开发问题
14