
Key FeaturesOffers practical advice in creating tests to quickly detect and resolve issues when writing portable codeUncovers code integration issues that improve code quality by using continuous integrationSet up and use data-driven unit testing to verify your code over a range on inputsBook DescriptionThis book enables developers to create robust, production-ready C# 7 and .NET Core applications by establishing a professional test-driven development process. To do this, we will begin by learning the stages of the TDD lifecycle, some best practices, and some anti-patterns.After covering the basics of TDD in the first chapter, we will get right into creating our ASP.NET Core MVC sample application. We will learn how to write testable code with SOLID principles, and will set up dependency injection for our sample application. Next, we will take a good look at the xUnit testing framework, and learn how to use its attributes and assertions. When we start writing our tests, we will learn what "Fact" vs. "Theory" means in .NET Core unit testing, as well as how to use each. When we get the basic in place, we will learn how to create data-driven unit tests and how to mock dependencies in our code. We will learn the differences between running and debugging our tests on .NET Core on LINUX, versus Windows and Visual Studio. We will wrap up by creating a healthy continuous integration process for our sample application, using GitHub, TeamCity, and Cake. Finally, we will modify the CI build to test, version, and package our sample application.What you will learnWrite flexible, maintainable, verifiable code for .NET CoreLearn how to write testable code using SOLID principles and dependency injectionsRecognize the characteristics of a good unit testHow to structure and group your unit testUse mock objects to handle dependenciesHow to set up a continuous integration process from end-to-end
Author: Ayobami Adewole