Mocking
Explore curated resources about Mocking.
Articles
Effective mocking
Bridging between NSubstitute and FluentAssertions
NSubstitute and FluentAssertions Redux
Mocking Data with Bogus
Lifelike Test Data Generation with Bogus
Seed Entity Framework Core With Bogus Data
Creating .NET fakes using Bogus
How to mock dependencies with Manifest resources
Write simpler tests with Type Builders and AutoFixture
5 tips for better stubs and mocks in C#
What are fakes in unit testing: mocks vs stubs
Generating data in dotnet core with GenFu
Realistic Sample Data with GenFu
Playing around with GenFu
Brincando com GenFu .NET Core
How to use Moq and xUnit for Unit Testing Controllers in ASP.NET Core
Mocking a method in the same test class using Mockito
Videos
Clean mocking for unit tests using NSubstitute in .NET (Core, Framework, Standard)
Getting started with Mocking using Moq in .NET (Core, Framework, Standard)
Creating a mocking library for .NET in C# FROM SCRATCH
Generating realistic fake data in .NET using Bogus
Introduction to Unit Testing Using AutoFixture
You are mocking the HttpClient the wrong way
Libraries
GestionSystemesTelecom/fake-authentication-jwtbearer
Simple way to faked an authenticated user for integration test with ASP.Net Core framework
force-net/DeepCloner
Fast object cloner for .NET
Tynamix/ObjectFiller.NET
The .NET ObjectFiller fills the properties of your .NET objects with random data
bchavez/Bogus
📇 A simple and sane fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
WireMock-Net/WireMock.Net
WireMock.Net is a flexible library for stubbing and mocking web HTTP responses using request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.
Mongo2Go/Mongo2Go
Mongo2Go - MongoDB for integration tests (.NET Core 3.0 and .NET 5.0)
bchavez/Bogus
📇 A simple and sane fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
AutoFixture/AutoFixture
AutoFixture is an open source library for .NET designed to minimize the 'Arrange' phase of your unit tests in order to maximize maintainability. Its primary goal is to allow developers to focus on what is being tested rather than how to setup the test scenario, by making it easier to create object graphs containing test data.
AnthonyGiretti/Calzolari-EFCore-Flurl-FakeBearerToken-TestServer
MisterJames/GenFu
GenFu is a library you can use to generate realistic test data. It is composed of several property fillers that can populate commonly named properties through reflection using an internal database of values or randomly created data. You can override any of the fillers, give GenFu hints on how to fill them.