Order Processing Testing – Moq 4 and xUnit

I am reading, experimenting and hopefully learning how to use Moq is a mocking framework for C#/.NET. To learn more about mocking objects read here. For additional documentation on moq4 read here.

After completing the PluralSight course “Mocking with Moq 4 and xUnit” I decided to look for examples of Moq mocking a database. This post is based on my experience and comments on the article Unit Test Through Mocking Using MOQ Framework by Chinmay Dey published Dec 26, 2018. Continue reading “Order Processing Testing – Moq 4 and xUnit”

Calculator in C#

In this post we will develop a simple calculator able to add, subtract, multiply and divide.

The code will be implemented in C# using Visual Studio 2022.

Once we have the main code operational, we will add xUnit and will test using Moq4.

Let’s start by showing some output from our simple calculator. Continue reading “Calculator in C#”