Basics of Unit Testing for C# Developers

Basics of Unit Testing for C# Developers

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 2h 09m | 415 MB

Every developer needs to test their code or have it tested by someone. In this course, you’ll learn how to start unit testing to improve the quality of your applications.

Every developer knows they should be creating unit tests to improve the quality of their applications. In this course, Basics of Unit Testing for C# Developers, you’ll learn how to create unit tests by using Visual Studio. First, you’ll see how easy it is to get started with creating unit tests. Next, you’ll explore how to simplify the unit test process by creating data-driven tests. Finally, you’ll cover how to automate your unit tests by scheduling them to run via the command line utility VSTest.Console. By the end of this course, you’ll have the required skills needed to go on and learn more advanced topics in unit testing.

Table of Contents

01 – Course Overview
02 – Introduction to Unit Testing
03 – The Tools Available in Visual Studio for Unit Testing
04 – Why Test Code
05 – QA Department or Unit Tests
06 – Testing Tools You Learn in This Course
07 – Module Summary
08 – What You Are Testing
09 – Get Started
10 – Create Your FileProcess Class
11 – Create Your Unit Test Project
12 – Arrange, Act, Assert
13 – Exception Handling in Unit Tests
14 – Code Coverage
15 – Module Summary
16 – Avoid Hard-coding Using Constants
17 – Avoid Hard-coding Using Configuration File
18 – Create SetGoodFileName Method
19 – Use SetGoodFileName Method and Create_Delete File
20 – Using TestContext
21 – Module Summary
22 – Goals of This Module
23 – Initialization and Cleanup
24 – Execution Order
25 – Assembly Initialize and Cleanup Methods
26 – Class Initialize and Cleanup Methods
27 – Test Initialize and Cleanup Methods
28 – Module Summary
29 – Introduction to Unit Test Attributes
30 – Description and Owner Attributes
31 – Priority and TestCategory Attributes
32 – Ignore and Timeout Attributes
33 – DeploymentItem Attribute
34 – Module Summary
35 – Assert Class Methods
36 – Pass a Message to Assert Class Methods
37 – Testing String Values
38 – Testing for Object Types
39 – Checking for a Specific Object Type
40 – Using the StringAssert Class
41 – Using the CollectionAssert Class
42 – Revisiting Code Coverage
43 – Module Summary
44 – Introduction to Data-driven Testing
45 – Create Table to Hold Test Values
46 – Create FileExistsFromDB Method
47 – Finish the FileExistsFromDB Method
48 – Store Data-driven Settings in Config File
49 – Module Summary
50 – Automating Unit Tests
51 – Running VSTest.console.exe
52 – Loggers and Logging to a .trx File
53 – Run One Specific Test
54 – Run Tests Based on Matching Names
55 – Run Tests Based on Attributes
56 – Module Summary
57 – Course Summary