Join Reynald Adolphe for an in-depth discussion in this video What you should know, part of C# Test Driven Development.
- [Voiceover] Alright, for this course I'm assuming that you're already comfortable coding in C#. In particular you should be familiar with just navigating through Visual Studio, object-oriented programming, collections, formatting strings and string interpolation, and expression-bodied function members. If you're not familiar with any of these or you have any questions while watching I'd recommend checking out the course C# Essential Training with David Gassner.
Also check out my course, C# 6.0 First Look, which covers string interpolation, expression-bodied function members, and a bunch of other new, cool 6.0 features.
In this course, Reynald Adolphe explains the principles of test-driven development and shows how to apply them to two different C# workflows. First, he creates a new test-driven project. He writes the test cases before the code to drive the design of the program. In the second scenario, he writes test cases for an existing C# project, to find bugs before it goes live. Along the way, Reynald uses Microsoft's MSTest, but he also introduces other testing tools (such as the unit testing framework xUnit and the mocking framework Moq) and theories (such as the red-green-refactor mantra and SOLID principles) that make test-driven development so efficient.
- Different approaches to testing
- Using testing tools and mocking frameworks
- Creating a simple C# test-driven project
- Adding a failing test
- Updating tests to pass
- Refactoring code
- Using Moq to test data