Reader small image

You're reading from  Pragmatic Test-Driven Development in C# and .NET

Product typeBook
Published inSep 2022
PublisherPackt
ISBN-139781803230191
Edition1st Edition
Right arrow
Author (1)
Adam Tibi
Adam Tibi
author image
Adam Tibi

Adam Tibi is a London-based software consultant with over 22 years of experience in .NET, Python, the Microsoft stack, and Azure. He is experienced in mentoring teams, designing architecture, promoting agile and good software practices, and, of course, writing code. Adam has consulted for blue-chip firms including Shell, Lloyds Bank, Lloyd’s of London, Willis Towers Watson, and for a mix of start-ups. As a consultant who has a heterogeneous portfolio of clients, he has gained a solid understanding of the TDD intricacies, which he has transferred into this book.
Read more about Adam Tibi

Right arrow

TDD pillars

TDD is a set of practices that specify how and when a unit test should be written. You can write unit tests without TDD, but TDD has to have a type of test associated with it. Sometimes, you can hear TDD and unit tests used as if they mean the same thing, but they are not.

While the ecosystem around TDD is sophisticated as it touches a lot of software engineering aspects, TDD as a standalone concept is easy to explain and understand. We can summarize TDD as these two pillars:

  • Test first
  • Red, Green, Refactor (RGR)

Let’s discuss these pillars.

Test first

The idea here is to start with the tests before starting with the production code. It really means testing code that doesn’t exist yet!

Testing first changes the way we write code, as now you are redirected to think about your classes' structure and public methods before the implementation. This encourages the developer to reflect on the design from the client’s perspective...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Pragmatic Test-Driven Development in C# and .NET
Published in: Sep 2022Publisher: PacktISBN-13: 9781803230191

Author (1)

author image
Adam Tibi

Adam Tibi is a London-based software consultant with over 22 years of experience in .NET, Python, the Microsoft stack, and Azure. He is experienced in mentoring teams, designing architecture, promoting agile and good software practices, and, of course, writing code. Adam has consulted for blue-chip firms including Shell, Lloyds Bank, Lloyd’s of London, Willis Towers Watson, and for a mix of start-ups. As a consultant who has a heterogeneous portfolio of clients, he has gained a solid understanding of the TDD intricacies, which he has transferred into this book.
Read more about Adam Tibi