In the previous article, we discussed how to test the UmamiClient using xUnit and Moq. In this article, we will discuss how to test the UmamiBackgroundSender class. The UmamiBackgroundSender is a bit different to UmamiClient as it uses IHostedService to stay…
In this post I'll be starting adding Unit Testing for this site. This won't be a full tutorial on Unit Testing, but rather a series of posts on how I'm adding Unit Testing to this site. In this post I test some services by mocking DbContext; this is to avoid…