There is a reason why Unit Testing is the bottom layer in the testing pyramid. You can only build a solid testing suite on a robust foundation. Nothing is more reassuring when working on a codebase than knowing that if you accidentally break something, a test will alert you, saving you hundreds to thousands or even hundreds of thousands of dollars in potential customer impact. In this course, Nick will teach you how to write modern unit tests for your code bases so you are always confident in change. Oh, and if you don't know what the testing pyramid is, don't worry. You will after you take this course.
Welcome
What will you learn in this course?
Who is this course for and prerequisites
Different types of testing
What is unit testing and why it's important?
The testing pyramid
Why should you write unit tests?
The 3 core unit testing concepts
Why xUnit?
Writing your first unit test
Structuring your solution
Naming in unit tests
Arrange, Act, Assert
xUnit's test execution model
Test Setup and Teardown
Parameterizing tests
Ignoring tests
Your turn to practice (Project source under the video)
My answer to the exercise
Section recap
Writing fluent assertions
Testing strings
Testing numbers
Testing dates
Testing objects
Testing enumerables
Testing methods that throw Exceptions
Testing for raised events
Testing private methods (members)
Testing internal methods (members)
Section recap
The problem with dependencies
Dependency injection to the rescue
What are fakes?
What is mocking?
Moq vs NSubstitute
Section recap
The project we will be adding unit tests to
The scope of our testing
Testing the application layer
Exercise: Testing the rest of the application layer (Project source under the video)
Exercise answer: Testing the rest of the application layer
But was all that necessary?
Testing the data layer
Testing the API layer
Exercise: Testing the rest of the API layer (Project source under the video)
Exercise answer: Testing the rest of the API layer
Section recap
Observing the default test execution behavior
The Class Fixture
The Collection Fixture
Running test in parallel
Advanced parameterization
Setting test execution timeouts
Testing Date and Time
Continuous testing
What is code coverage?
Measuring code coverage
Section recap
Course conclusion
Course Info
Lifetime access
Add to Cart
Nick Chapsas is a .NET & C# content creator, educator and a Microsoft MVP for Developer Technologies with years of experience in Software Engineering and Engineering Management.
He has worked for some of the biggest companies in the world, building systems that served millions of users and tens of thousands of requests per second.
Nick creates free content on YouTube and is the host of the Keep Coding Podcast.
More courses by Nick Chapsas© 2023 Dometrain. All rights reserved.