vTMockDataForge 12.11.10

dotnet add package vTMockDataForge --version 12.11.10
                    
NuGet\Install-Package vTMockDataForge -Version 12.11.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="vTMockDataForge" Version="12.11.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="vTMockDataForge" Version="12.11.10" />
                    
Directory.Packages.props
<PackageReference Include="vTMockDataForge" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add vTMockDataForge --version 12.11.10
                    
#r "nuget: vTMockDataForge, 12.11.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package vTMockDataForge@12.11.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=vTMockDataForge&version=12.11.10
                    
Install as a Cake Addin
#tool nuget:?package=vTMockDataForge&version=12.11.10
                    
Install as a Cake Tool

Stop Tedious Test Data Setup: Introducing vT.MockDataForge for Effortless C# Object and List Mocking

As developers, we’ve all been there-facing a complex object model that needs to be filled with realistic data for testing, demos, or seeding a database. And what does that usually mean?

  • Long hours crafting verbose object initializers
  • Boilerplate code that clutters your test suites
  • Logic hidden beneath layers of mock data setup
You’ve seen code like this far too often:
// The Old Way: Manual Object Initialization (50+ lines!)
var company = new Company
{
    CompanyId = "C001",
    Name = "Company1",
    Industry = "Industry1",
    Address = new Address
    {
        AddressId = "A001",
        StreetAddress = "Street1",
        City = "City1",
        State = "State1",
        PostalCode = "PostalCode1",
        Country = "Country1"
    },
    Employees = new List<Employee>
    {
        new Employee
        {
            EmployeeId = "E001",
            FirstName = "FirstName1",
            // ...
        }
    }
    // And so on… (50+ lines!)
};	

Now imagine replacing all that with:

var company = new Company().MockWithFakeData();

That’s not magic — it’s vT.MockDataForge.


Meet vT.MockDataForge

vT.MockDataForge is a lightweight, developer-friendly .NET library that simplifies C# object mocking to a beautiful one-liner — with realistic, contextual fake data generated intelligently.

Whether you’re writing unit tests, seeding a database, preparing a demo, or stress-testing an API — this tool will be your new best friend.


Key Features

One-Liner Initialization

var customer = new Customer().MockWithFakeData();
var order = new Order().MockWithFakeData();

Mock Collections in Seconds

var companies = new List<Company>().MockWithFakeData(count: 5);

var orders = new List<Order>().MockWithFakeData(count: 3, builder =>
{
    builder.For(o => o.OrderDate, g => g.Date.Recent(30))
           .For(o => o.Status, g => g.PickAnyValue.Get(["Pending", "Processing", "Shipped"]));
});

Fluent, Custom Configuration

var company = new Company().MockWithFakeData(builder =>
{
    builder.For(c => c.EmployeeCount, g => g.Number.Integer(10, 1000))
           .For(c => c.CompanyId, g => $"COMP-{Guid.NewGuid():N}"[..8])
           .For(c => c.Name, g => g.Company.Name())
           .For(c => c.Email, g => g.Email.BusinessEmail());
});

Pick any value from a fixed list:

builder.For(e => e.Department, g => g.PickAnyValue.Get(["Sales", "HR", "IT"]));

Use regex to generate pattern-based values:

.For(e => e.Passport, g => g.RegexValueGenerator.Generate(@"^[A-Z][1-9]\d\s?\d{4}[1-9]$"))

Perfect for enums, formatted codes, and domain-specific rules.


Realistic Mock Data Categories

Category Examples
People Names, emails, phone numbers
Business Companies, job titles, salaries
Location Cities, addresses, postal codes
Temporal Dates, timestamps, durations
Financial Revenues, currencies, salaries
Custom Regex patterns, enums, codes

Handles Complex Object Graphs Gracefully

var company = new Company().MockWithFakeData(builder =>
{
    builder.For(c => c.Address, g => new Address().MockWithFakeData())
           .For(c => c.Employees, g => new List<Employee>().MockWithFakeData(emp =>
           {
               emp.For(e => e.FirstName, g => g.Name.FirstName())
                  .For(e => e.Address, g => new Address().MockWithFakeData());
           }, minItems: 2, maxItems: 5));
});

Use Cases

Unit Testing

var activeUsers = new List<User>().MockWithFakeData(count: 10, builder =>
{
    builder.For(u => u.IsActive, g => true);
});

API & Performance Testing

var orders = new List<Order>().MockWithFakeData(count: 500);

Demos & Presentations

var sampleCompanies = new List<Company>().MockWithFakeData(count: 20, builder =>
{
    builder.For(c => c.Industry, g => g.PickAnyValue.Get(["Tech", "Finance", "Retail"]));
});

Before vs After

Without vT.MockDataForge With vT.MockDataForge
50+ lines of setup 1–5 lines of clean config
Verbose and hard to maintain Fluent and expressive
Repetitive boilerplate Auto-generated smart defaults
Time-consuming setup Instant, contextual data

Get Started in 2 Minutes

Install via NuGet:

dotnet add package vTMockDataForge

Or via Package Manager:

Install-Package vTMockDataForge

Start Mocking:

using vT.MockDataForge;

var obj = new MyClass().MockWithFakeData();
var list = new List<MyClass>().MockWithFakeData(count: 10);

Why Developers Love vT.MockDataForge

  • Intuitive: Learn in minutes
  • Powerful: Handles deep object graphs
  • Flexible: Full control over values
  • Ready for production: Tested in real-world projects

Perfect For:

  • Unit Testing
  • Integration Testing
  • API Testing
  • Demo Data
  • Database Seeding
  • Load/Performance Testing

Say Goodbye to Tedious Mocking

With vT.MockDataForge, your C# test data setup becomes effortless, expressive, and clean. Less boilerplate. More brilliance.

Made with ❤️ for the .NET Community.
Happy Coding!

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
12.11.10 137 6/14/2025