There is a lot of resources available online when it comes to TDD. However, I have always found that a good book is better than most online resources. Therefore I borrowed home a book called 'Professional Test-Driven Development with C#' by James Bender and Jeff McWherter.
So far I am 5 chapters in to the book (about 1/3) and here is some of my reflections regarding the content:
So far I am 5 chapters in to the book (about 1/3) and here is some of my reflections regarding the content:
- The book provides many code examples, which is positive. There is however at least one code listing that is incorrect (looks like the wrong listing was inserted).
- The authors put great emphasis on Red-Green-Refactor. That no application code should be written before there is a failing test for it. Still in chapter 5 they write the application code first and then add the tests later - WRONG!
- A lot of focus is put on the use of frameworks. I understand that you shouldn't re-invent the wheel and that choosing a good test framework, like NUnit, is a good thing to do. However, you should be careful not to make your application too dependent on external frameworks that you do not have any control over. Examples of frameworks that are mentioned are NUnit, Moq, Ninject, Entitiy Framework, and NHibernate.
- Principles like SOLID are mentioned and described briefly. If you are totally unfamiliar with SOLID I recommend reading up on those before diving into this book. The explanations are good for refreshing existing knowledge on SOLID but not enough if you don't have any previous experience of it.
Kommentarer
Skicka en kommentar