What a TDD book for C # with Mocks processing

Can you recommend a book on testing devices and TDD for C #, at least for handling layouts?

I saw this question , but it doesn't seem to be mocking.

+4
source share
4 answers

The Art of Unit Testing: With examples at .NET by Roy Osherove ( Amazon Page , Official Website ), it sounds like you're looking. He devotes one chapter introducing the concept of stubs and layouts (using the “your own” approach), and then a second chapter on the use of mock object frames, in particular Rhino Mocks . There is a bit less focus on Test-Driven Development, but there is a lot of information about TDD available from other sources, and TDD is not everything that depends on the language.

+6
source

Take a look at Growing Object Oriented Software, guided by tests from Steve Freeman and Nat Pryce - work in progress, but free online. Code examples in java, which should not be a problem if you are a C # developer and focus heavily on Mocks.

+6
source

In my opinion, pragmatic testing of modules in C # with NUnit, 2nd Edition is the best introduction to Unit Testing. He also got a chapter on Mock Objects.

+3
source

XUnit Test Patterns contains several sections on test pairs, including Mocks. Not C # specific, but contains C # examples.

+1
source

Source: https://habr.com/ru/post/924786/


All Articles