Testing .NET Code in Visual Studio 2019

Testing .NET Code in Visual Studio 2019
Testing .NET Code in Visual Studio 2019
English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 2h 52m | 563 MB

Visual Studio 2019 has great support and new features for unit tests. This course will show you how to write and run unit tests in Visual Studio 2019 helping you write rock-solid applications.

At the core of writing robust .NET code is a thorough knowledge of testing. In this course, Testing .NET Code in Visual Studio 2019, you will explore the skills you need to test your .NET code in Visual Studio 2019. First, you will learn how to create a test project and how to write and run unit tests. Next, you will discover how to write data-driven tests and how to work with the popular test frameworks MSTest, NUnit, and xUnit. Finally, you will see how to analyze the code coverage of your tests and how to run tests in real-time with Live Unit Testing. When you’re finished with this course, you’ll have a foundational knowledge of testing .NET Code in Visual Studio 2019 that will help you as you move forward to test and implement your own .NET projects. This course was recorded using the preview version of Visual Studio 16.2 to reflect what the user interface will look like going forward.

Table of Contents

Course Overview
1 Course Overview

Creating Your First Test Project
2 Introduction
3 The Wired Brain Coffee Scenario
4 Look at the Code to Test
5 Create a Test Project
6 Add the OrderCreationServiceTests Class
7 Course Outline

Writing and Running Unit Tests
8 Introduction
9 Implement Your First Test Method
10 Fake Dependencies with Moq
11 Initialize Tests
12 Check if Stock of Coffee Cups Was Exceeded
13 Assert Exceptions
14 Start the Coffee Cup Order Admin Tool
15 Target .NET Core and .NET Framework
16 Create and Use Playlists
17 Run Tests with Shortcuts and CodeLens
18 Summary

Implementing Data Driven Tests
19 Introduction
20 Test and Calculate the Discount Percentage
21 Create a Data Driven Test Method
22 Test Discount for Premium Customers
23 Access and Test Internal Members
24 Run the Coffee Cup Order Admin Tool
25 Summary

Testing with MSTest, NUnit, or xUnit
26 Introduction
27 Which Test Framework Should You Use –
28 Understand How Test Adapters Work
29 The Test Adapter of MSTest in Action
30 Write Tests with NUnit
31 Write Tests with xUnit
32 Summary

Analyzing Code Coverage
33 Introduction
34 Run a Code Coverage Analysis
35 Improve Code Coverage with More Tests
36 Import and Export Code Coverage Results
37 Exclude Code from the Code Coverage Analysis
38 Configure Analysis with a Runsettings File
39 Summary

Using Live Unit Testing
40 Introduction
41 Explore Live Unit Testing
42 Write Tests with Live Unit Testing
43 Exclude Tests from Live Unit Testing
44 Exclude Test Methods Programmatically
45 Configure Live Unit Testing
46 Summary