Skip to content

amirdoosti6060/MoqDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MoqDemo

Introduction

This project provide a sample that shows how to use moq package in C#.
I also wrote an article in the following address that completely explains Unit testing with Moq in C#:
https://www.linkedin.com/pulse/unit-testing-moq-c-amir-doosti-oulef

Structure of soution

The solution contains one Console App project and one xUnit test project which are written in Visual Studio.
You will find descriptive comments on top of each test.

Technology stack

  • OS: Windows 10 Enterprise - 64 bits
  • IDE: Visual Studio Enterprise 2022 (64 bits) - version 17.2.5
  • Framework: .Net 6
  • Language: C#
  • Test Framework: xUnit
  • Packages: Moq

How to run

Open the solution in Visual Studio and run it using F5. You will see the output in a console.
Also open "Test Explorer" and run all tests there.