An open API service indexing awesome lists of open source software.

https://github.com/amirdoosti6060/moqdemo

This project shows how to use Moq in unit tests.
https://github.com/amirdoosti6060/moqdemo

csharp mock mockup moq testing unit-testing xunit

Last synced: 12 months ago
JSON representation

This project shows how to use Moq in unit tests.

Awesome Lists containing this project

README

          

# 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.