Learn the core concepts behind testing and how to write and run tests for components using xUnit with examples in ASP.NET Core
While the Integration tests are helpful in assessing how well two or more components work together as a whole for a desired functionality, the Unit Tests work at a lower level than the integration tests and are helpful in verifying the functionality of a single component or a unit.
Unit Testing requires testing in "Isolation". Learn about how we can write unit tests for a simple ASP.NET Core application component by mocking all its dependencies using the Moq framework.
When it comes to functionalities which are encapsulated in the form of methods, we have returning methods and void methods. While unit testing a returning method is a simpler deal; testing a void method which does some operation but doesn't return anything to indicate the calling component of its result is dealt in a different way.
In the part two article, learn about writing Interaction unit tests aka Void Methods. We assert the functionality of such methods by verifying whether a particular method has been called or not.