Best practices for organising Mock Data & Repositories in Testing

This page summarizes the projects mentioned and recommended in the original post on /r/dotnet

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • eShopOnContainers

    Discontinued Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 7, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor. Moved to https://github.com/dotnet/eShop.

  • For an example of an aggregate if you're unfamiliar - https://github.com/dotnet-architecture/eShopOnContainers/blob/3169a933447f1013c069e2cad2805c5de1ce9fbf/src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Order.cs

  • Bogus

    :card_index: A simple fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.

  • To do all this you need test though...and that's where ]Bogus](https://github.com/bchavez/Bogus) and Auto Bogus come in handy. They both generate semi random test data that you can use to populate whatever method you've decided to use. You can setup rules so for specific fields, they have built in generators for common things like names and addresses. Auto Bogus can be used to populate large/complicated objects with data automatically (it can be slow if you don't use .WithRecursiveDepth() or.WithTreeDepth() )

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

    InfluxDB logo
  • AutoBogus

    A C# library complementing the Bogus generator by adding auto creation and population capabilities.

  • To do all this you need test though...and that's where ]Bogus](https://github.com/bchavez/Bogus) and Auto Bogus come in handy. They both generate semi random test data that you can use to populate whatever method you've decided to use. You can setup rules so for specific fields, they have built in generators for common things like names and addresses. Auto Bogus can be used to populate large/complicated objects with data automatically (it can be slow if you don't use .WithRecursiveDepth() or.WithTreeDepth() )

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts