Table of Contents
Preface
Part 1: Getting Started and the Basics of TDD
1
Writing Your First TDD Implementation
Technical requirements
Choosing your IDE
Microsoft VS
JetBrains Rider
VS Code
.NET and C# versions
Building a solution skeleton with unit testing
Requirements
Creating a project skeleton
Familiarizing yourself with built-in test tools
Implementing requirements with TDD
SUT
Testing class
Conditions and expectations
Red/green
The AAA pattern
More tests
Summary
Further reading
2
Understanding Dependency Injection by Example
Technical requirements
The WFA
Creating a sample weather forecaster
Adding a real weather forecaster
Understanding dependency
Abstractions and concrete types
What is a dependency?
Dependency relevance
Depend on abstraction, ...
Get Pragmatic Test-Driven Development in C# and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.