In previous chapters, we looked at how to build things in ASP.NET Core. We are aware that we should be testing our applications before we consider them done. What happens is that applications evolve and stuff that used to work at one point in time may no longer work now. So, to ensure that these applications do not fail on us, we set up tests that can run automatically and check whether everything is still working as it should.
We will cover the following topics in this chapter:
- Unit testing principles
- Using xUnit, NUnit, and MSTest
- Mocking objects
- Assertions
- User interface tests
- Working on integration tests
In this chapter, we will have a look at two approaches for executing these tests and how they help us ensure that we write well-integrated code.