Course
Skills Expanded
Better Unit Test Assertions with Shouldly 2
Learn how to improve test code readability and assert failure messages in automated .NET tests.
What you'll learn
By the end of this course, you'll know how to use the open source Shouldly library to get more meaningful and easily-debuggable test failure messages and how Shouldly helps to improve the readability of unit tests due to the more "fluent-like" test code.
Table of contents
Introducing Shouldly
22mins
Asserting Different Types of Test Results
44mins
- Introduction 2m
- Asserting Numeric Equality and Inequality 9m
- Asserting String Equality 4m
- Asserting String Contents are Correct 4m
- Asserting Null and Boolean Values 5m
- Asserting DateTime Results 5m
- Asserting That Results Fall Within Expected Ranges 5m
- Asserting That Collections Contain the Correct Items 6m
- Asserting Dictionary Keys and Values 4m
- Summary 2m
Using the Additional Assertion Features of Shouldly
25mins