Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the best steps to start programming with TDD with C#?

Tags:

c#

.net

tdd

I want to start working with TDD but I don't know really where to start. We coding with .NET (C#/ASP.NET).

like image 523
Maxime Rouiller Avatar asked Oct 03 '08 20:10

Maxime Rouiller


People also ask

What is the first step of TDD?

Five steps of test-driven developmentRead, understand, and process the feature or bug request. Translate the requirement by writing a unit test. If you have hot reloading set up, the unit test will run and fail as no code is implemented yet. Write and implement the code that fulfills the requirement.

How do you start a project with TDD?

The main idea is to start the development process by writing tests covering your functionality. With that done, write source code that will work for every test case that you create. As you begin working on each new feature, first — add missing tests related to the required functionalities and only then implement it.

What are the 3 stages of TDD?

Test-driven development (TDD) is an approach to software development where you write tests first, then use those tests to drive the design and development of your software application.


2 Answers

See the questions Why should I practice Test Driven Development and how should I start?, Moving existing code to Test Driven Development, What is unit testing? and What is TDD?

like image 52
Anthony Avatar answered Oct 21 '22 18:10

Anthony


I would start by reading up on TDD and why it's a good practice. As you read that, try to think about how the concepts apply to your own projects.

When I was learning TDD, it seemed simple at first, but it's such a paradigm shift that it forced me to change the way I thought about how my program would work. And I guess that's kind of the point. :)

like image 29
Robert S. Avatar answered Oct 21 '22 18:10

Robert S.