{"id":49309643,"url":"https://github.com/lemonlion/mongodb.inmemoryemulator","last_synced_at":"2026-04-26T12:01:26.600Z","repository":{"id":353937551,"uuid":"1221044366","full_name":"lemonlion/MongoDB.InMemoryEmulator","owner":"lemonlion","description":"An In-Process Emulator/Fake For MongoDB To Be Used For Integration/Component Testing","archived":false,"fork":false,"pushed_at":"2026-04-26T10:36:11.000Z","size":231,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T11:23:07.558Z","etag":null,"topics":["acceptance-testing","component-testing","database","emulator","fake","integration-testing","mock","mocking-library","mongodb","testing","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lemonlion.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-25T17:19:13.000Z","updated_at":"2026-04-26T10:36:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lemonlion/MongoDB.InMemoryEmulator","commit_stats":null,"previous_names":["lemonlion/mongodb.inmemoryemulator"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lemonlion/MongoDB.InMemoryEmulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonlion%2FMongoDB.InMemoryEmulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonlion%2FMongoDB.InMemoryEmulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonlion%2FMongoDB.InMemoryEmulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonlion%2FMongoDB.InMemoryEmulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemonlion","download_url":"https://codeload.github.com/lemonlion/MongoDB.InMemoryEmulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonlion%2FMongoDB.InMemoryEmulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32296259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acceptance-testing","component-testing","database","emulator","fake","integration-testing","mock","mocking-library","mongodb","testing","testing-tools"],"created_at":"2026-04-26T12:01:25.888Z","updated_at":"2026-04-26T12:01:26.592Z","avatar_url":"https://github.com/lemonlion.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"icon.svg\" width=\"32\" height=\"32\" alt=\"MongoDB.InMemoryEmulator icon\" style=\"vertical-align: middle;\"\u003e MongoDB.InMemoryEmulator\n\n[![NuGet](https://img.shields.io/nuget/v/MongoDB.InMemoryEmulator.svg)](https://www.nuget.org/packages/MongoDB.InMemoryEmulator/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nA high-fidelity, in-process fake for the **MongoDB .NET/C# Driver** — zero Docker, zero network, instant startup.\n\n## Why?\n\n- **Instant** — ~0ms startup (vs 2-15s for Docker/Mongo2Go)\n- **Portable** — No Docker, no `mongod` binaries, no ports\n- **Reliable** — No flaky timeouts, port conflicts, or container failures\n- **High-fidelity** — Real filter, update, and aggregation semantics (not mocks)\n\n## Quick Start\n\n```\ndotnet add package MongoDB.InMemoryEmulator\n```\n\n### Unit Tests\n\n```csharp\nvar result = InMemoryMongo.Create\u003cOrder\u003e(\"orders\");\nvar collection = result.Collection;\n\nawait collection.InsertOneAsync(new Order { Total = 99.99m });\nvar found = await collection.Find(o =\u003e o.Total \u003e 50).FirstOrDefaultAsync();\n```\n\n### Integration Tests (DI)\n\n```csharp\nservices.UseInMemoryMongoDB(options =\u003e\n{\n    options.DatabaseName = \"testdb\";\n    options.AddCollection\u003cOrder\u003e(\"orders\");\n});\n```\n\n## What's Supported\n\n| Feature | Status |\n|---------|--------|\n| Full CRUD (Insert, Find, Update, Replace, Delete, BulkWrite) | ✅ |\n| Aggregation Pipeline (34 stages, 100+ expression operators) | ✅ |\n| Indexes (Unique, Compound, Sparse, Partial Filter, TTL) | ✅ |\n| Change Streams | ✅ |\n| Transactions (snapshot isolation) | ✅ |\n| GridFS | ✅ |\n| Schema Validation (`$jsonSchema`) | ✅ |\n| Capped Collections + Tailable Cursors | ✅ |\n| Views | ✅ |\n| LINQ (`AsQueryable()`) | ✅ |\n| Fault Injection | ✅ |\n| State Persistence (Export/Import) | ✅ |\n| DI Integration (2 extension methods) | ✅ |\n\n## NuGet Packages\n\n| Framework | Package | Description | NuGet |\n|---|---|---|---|\n| **Core library** | `MongoDB.InMemoryEmulator` | Primary features | [![NuGet Version](https://img.shields.io/nuget/v/MongoDB.InMemoryEmulator)](https://www.nuget.org/packages/MongoDB.InMemoryEmulator) |\n| **JavaScript Triggers** | `MongoDB.InMemoryEmulator.JsTriggers` | `$function`, `$accumulator`, `$where` via Jint | [![NuGet Version](https://img.shields.io/nuget/v/MongoDB.InMemoryEmulator.JsTriggers)](https://www.nuget.org/packages/MongoDB.InMemoryEmulator.JsTriggers) |\n\n## Documentation\n\nSee the [Wiki](https://github.com/lemonlion/MongoDB.InMemoryEmulator/wiki) for full documentation:\n\n- [Getting Started](https://github.com/lemonlion/MongoDB.InMemoryEmulator/wiki/Getting-Started)\n- [Setup Guide](https://github.com/lemonlion/MongoDB.InMemoryEmulator/wiki/Setup-Guide) (5 DI patterns)\n- [Features](https://github.com/lemonlion/MongoDB.InMemoryEmulator/wiki/Features)\n- [Filter \u0026 Update Operators](https://github.com/lemonlion/MongoDB.InMemoryEmulator/wiki/Filter-Update-Operators)\n- [Aggregation Pipeline](https://github.com/lemonlion/MongoDB.InMemoryEmulator/wiki/Aggregation-Pipeline) (34 stages)\n- [Migration Guide](https://github.com/lemonlion/MongoDB.InMemoryEmulator/wiki/Migration-Guide) (from Mongo2Go / Testcontainers)\n- [Known Limitations](https://github.com/lemonlion/MongoDB.InMemoryEmulator/wiki/Known-Limitations)\n\n## Requirements\n\n- .NET 8.0+\n- MongoDB.Driver 2.28.0+\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonlion%2Fmongodb.inmemoryemulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemonlion%2Fmongodb.inmemoryemulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonlion%2Fmongodb.inmemoryemulator/lists"}