From the course: C# Unit Testing with xUnit
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
The TDD cycle - C# Tutorial
From the course: C# Unit Testing with xUnit
The TDD cycle
- [Narrator] Let's do a deep dive into the test-driven development cycle, or TDD for short. We'll discuss where XUnit fits in, some important terminology used in XUnit, and each phase of the red, green, and refactor process. Test-driven development is a software development methodology where you write tests before writing the corresponding code. XUnit is a testing framework that'll provide us the structure and a way to create automated tests. Let's take a look at some of the terminology we'll need to know when using XUnit. A unit test is focused and tests a small unit of functionality. This allows us to verify the correctness of our code at a granular level. XUnit is a popular testing framework for .NET. It provides a structure for writing and running tests, making it easier to ensure our code behaves as expected. Assertions are the statements that test the logic of our code. For instance, if we have a method that adds…