C# 7 Test Driven Development

Ayobami Adewole

  • 出版商: Packt Publishing - ebooks Account
  • 出版日期: 2018-05-21
  • 售價: $1,477
  • 貴賓價: 9.5$1,403
  • 語言: 英文
  • 頁數: 422
  • 裝訂: Paperback
  • ISBN: 1788292480
  • ISBN-13: 9781788292481
  • 相關分類: C#

下單後立即進貨 (1~2週)

相關活動主題

Packt small0202

商品描述

Key Features

  • Offers practical advice in creating tests to quickly detect and resolve issues when writing portable code
  • Uncovers code integration issues that improve code quality by using continuous integration
  • Set up and use data-driven unit testing to verify your code over a range on inputs

Book Description

This 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 learn

  • Write flexible, maintainable, verifiable code for .NET Core
  • Learn how to write testable code using SOLID principles and dependency injections
  • Recognize the characteristics of a good unit test
  • How to structure and group your unit test
  • Use mock objects to handle dependencies
  • How to set up a continuous integration process from end-to-end