C# Mocking

Open-source C# projects categorized as Mocking

Top 11 C# Mocking Projects

  • NSubstitute

    A friendly substitute for .NET mocking libraries.

    Project mention: What am I missing about interfaces? | /r/csharp | 2023-11-23

    a. you might do so purely out of argo cult, i.e. because someone told you this was the right thing to do™, and that's a silly exercise. b. you could also be doing this for a good reason: to use the interface with a mocking tool like NSubstitute

  • FakeItEasy

    The easy mocking library for .NET

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • mockhttp

    Testing layer for Microsoft's HttpClient library. Create canned responses using a fluent API.

    Project mention: Mock heavy tests | /r/dotnet | 2023-06-01

    I'd say that without wanting to refactor the code a little bit (maybe moving those HttpClients into a service so that they are easily mocked) your best bet would be to use something like WireMock or MockHttp.

  • WireMock.Net

    WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.

    Project mention: Mock heavy tests | /r/dotnet | 2023-06-01

    I'd say that without wanting to refactor the code a little bit (maybe moving those HttpClients into a service so that they are easily mocked) your best bet would be to use something like WireMock or MockHttp.

  • pose

    Replace any .NET method (including static and non-virtual) with a delegate

  • MockQueryable

    Mocking Entity Framework Core operations such ToListAsync, FirstOrDefaultAsync etc

  • Mockaco

    🐵 HTTP mock server, useful to stub services and simulate dynamic API responses, leveraging ASP.NET Core features, built-in fake data generation and pure C# scripting

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • fake-xrm-easy

    The testing framework for Dynamics CRM and Dynamics 365 which runs on an In-Memory context and deals with mocks or fakes for you

  • CreateAndFake

    A C# class library that handles mocking, test data generation, and validation.

  • DivertR

    The .NET mocking framework for integration testing.

    Project mention: Since v4.20, Moq is harvesting email addresses | news.ycombinator.com | 2023-08-08

    If you're looking for alternatives to Moq please check out DivertR, a mocking framework I have created https://github.com/devodo/DivertR

  • MyBlazorApp

    This project is an example of implementing a Mock-Driven Approach in Blazor Applications. See more: https://blog.devinstance.net/implementing-a-mock-driven-approach-in-blazor-applications

    Project mention: Implementing a Mock-Driven Approach in Blazor Applications | dev.to | 2023-04-27

    The full source of this solution is available on GitHub.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-11-23.

C# Mocking related posts

Index

What are some of the best open-source Mocking projects in C#? This list will help you:

Project Stars
1 NSubstitute 2,540
2 FakeItEasy 1,623
3 mockhttp 1,540
4 WireMock.Net 1,283
5 pose 1,068
6 MockQueryable 694
7 Mockaco 316
8 fake-xrm-easy 262
9 CreateAndFake 11
10 DivertR 10
11 MyBlazorApp 0
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com