Getting Started with FakeItEasy for Mocking and Unit Testing in .NET

When working with unit tests in C# and .NET, creating mock objects and simulating behaviors of dependencies are crucial steps. Enter FakeItEasy, a simple yet powerful mocking framework that can save you time and reduce boilerplate code. In this blog, we’ll dive into FakeItEasy and demonstrate its usage in a practical scenario involving C# 11 … Read more

NUnit – Unit Testing in .Net Core

When doing the YouTube video for the last blog https://dotnetcorecentral.com/blog/sqlite-for-unit-testing-in-net-core/, I mentioned that I might do a post in NUnit. Hence, here it is, an introduction to NUnit as I dig through some of the features. What is NUnit? NUnit is a unit testing framework for .Net. It is probably the most popular unit testing … Read more

Unit testing with Machine.Specifications (aka MSpecs) and FakeItEasy – Continued

In the last post Unit testing with Machine.Specifications (aka MSpecs) and FakeItEasy, I have covered basic unit testing with MSpecs and FakeItEasy. Today first I am going to go through some more tests. And then I will cover the concepts of white-box testing with MSpecs and FakeItEasy. New tests for positive cases In the last … Read more

Unit testing with Machine.Specifications (aka MSpecs) and FakeItEasy

Unit testing is very critical for any application. In this blog post, I will walk through unit testing using Machine.Specifications (aka MSpecs) and FakeItEasy. The focus of unit testing is to test a unit of code in isolation of everything around it. Meaning we just test the method in questions and not the dependencies. Also … Read more

ASP.Net Core Web API – Unit Testing With XUnit

Hello everyone, welcome back to .Net Core Central. Today I am going to start with Unit testing of the Time Management application, that I have started building from my blog post Creating First ASP.Net Core Web API Application. I will be using XUnit as the testing framework. What is Unit Testing In a nutshell Unit … Read more