C# Test-Driven Development
1h 22mIntermediate2021-09-23
Authors

Christian Wenz
Web Pioneer, Technology Specialist, Entrepreneur
Course details
The old carpentry adage “measure twice, cut once” may not seem applicable to programming, but when you consider all the ill effects that bad code can have down the line, doesn’t “test twice, code once” make sense? The later you test, the more effort it requires to fix any issues that may have been introduced months ago. With test-driven development, you create the test first, and then you write the code. In this course, Christian Wenz shows how to apply TDD principles to C# programming. Christian takes a look at TDD in theory (what does it mean and what does a programmer need to know?), as well as in practical terms (how do you use TDD for C#-based projects?). He also illustrates TDD in action by adding tests, offers advice to help programmers understand available frameworks, and looks at more complex scenarios for using TDD like testing web applications and APIs, and replacing database objects during a test.
Skills covered
C#Software TestingDevOps FoundationsDevOpsProgramming LanguagesMicrosoftSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Testing web applications and APIs
- 02 - What you should know
1. TDD Theory
- 03 - About testing
- 04 - What is TDD
- 05 - Advantages and disadvantages of TDD
- 06 - Software and tooling
2. Getting Started with TDD
- 07 - Demo project introduction
- 08 - Creating a test
- 09 - Fixing the code
- 10 - Adding another test
- 11 - Satisfying the next test
- 12 - Challenge - Making the test pass
- 13 - Solution - Making the test pass
3. Advanced TDD Techniques
- 14 - Introduction to mocking
- 15 - Adding an interface
- 16 - Using a test with a mock
- 17 - Testing without a database - Preparations
- 18 - Demo - Testing without a database
- 19 - Testing ASP.NET Core applications - Preparations
- 20 - Demo - Testing ASP.NET Core applications
- 21 - Challenge - Testing an API
- 22 - Solution - Testing an API
Conclusion
- 23 - Next steps with C#