{"id":18626375,"url":"https://github.com/drbarnabus/mimic","last_synced_at":"2025-06-11T15:42:25.395Z","repository":{"id":192146357,"uuid":"686155976","full_name":"DrBarnabus/Mimic","owner":"DrBarnabus","description":"Fast, friendly and familiar mocking library for modern .NET","archived":false,"fork":false,"pushed_at":"2024-11-19T22:27:13.000Z","size":275,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-06T22:42:03.523Z","etag":null,"topics":["csharp","dotnet","dotnet-core","fake","mock","mocking","spy","tdd","test","testing","unit-test","unit-testing"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Mimic","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/DrBarnabus.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}},"created_at":"2023-09-01T22:22:42.000Z","updated_at":"2024-11-19T22:27:17.000Z","dependencies_parsed_at":"2023-09-02T23:13:17.758Z","dependency_job_id":"5bd8e761-13c3-4cf5-906c-78bd519029fe","html_url":"https://github.com/DrBarnabus/Mimic","commit_stats":null,"previous_names":["drbarnabus/mimic"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrBarnabus%2FMimic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrBarnabus%2FMimic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrBarnabus%2FMimic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrBarnabus%2FMimic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrBarnabus","download_url":"https://codeload.github.com/DrBarnabus/Mimic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252882255,"owners_count":21819149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["csharp","dotnet","dotnet-core","fake","mock","mocking","spy","tdd","test","testing","unit-test","unit-testing"],"created_at":"2024-11-07T04:37:50.523Z","updated_at":"2025-06-11T15:42:25.359Z","avatar_url":"https://github.com/DrBarnabus.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mimic\n\n#### Fast, friendly and familiar mocking library for modern .NET\n\n[![GitHub Release][gh-release-badge]][gh-release]\n[![NuGet Downloads][nuget-downloads-badge]][nuget-downloads]\n[![Build Status][gh-actions-badge]][gh-actions]\n[![Codecov][codecov-badge]][codecov]\n\n#### [What is Mimic](#what-is-mimic) | [Features](#features) | [Roadmap](#roadmap) | [Changelog][changelog]\n\n---\n\n**Mimic** is still very early in it's development and the functionality and/or interfaces that it provides are subject\nto change without warning between versions until the v1 release.\n\n## What is Mimic\n\n**Mimic** is a friendly and familiar mocking library built for modern .NET built on top of the [Castle Project][castle]'s\ndynamic proxy generator. It's simple, intuitive and type-safe API for configuring mimic's of interfaces/classes allows\nfor both; Setup of return values for methods/properties and verifying if method calls have been received after the fact.\n\n```csharp\nvar mimic = new Mimic\u003cITypeToMimic\u003e();\n\n// Easily setup methods\nmimic.Setup(m =\u003e m.IsMimicEasyToUse(Arg.Any\u003cstring\u003e()))\n    .Returns(true);\n\n// Access the `Object` property to generate an implementation of `ITypeToMimic` and call our setup method\nITypeToMimic mimickedObject = mimic.Object;\nbool whatDoYouThink = mimickedObject.IsMimicEasyToUse(\"it's so intuitive\");\n\n// Verify that the specified method has been called at least once on the `Object`\nmimic.VerifyReceived(m =\u003e m.IsMimicEasyToUse(\"it's so intuitive\"), CallCount.AtLeastOnce);\n```\n\n## Features\n\n- A friendly interface designed to ease adoption by users of other popular .NET mocking libraries\n- Support for generating mock objects of interfaces and overridable members in classes\n- Intuitive and type-safe expression based API for setups and verification of methods\n- Mimic is **strict by default**, meaning it throws for methods without a corresponding setup, but it's possible to\n  disable the default behaviour by setting `Strict = false` on construction\n- Quick and easy stubbing of properties to store and retrieve values\n- Implicit mocking of interfaces returned by mimicked methods allowing for easy setup of nested calls\n- Comprehensive set of behaviours for method setups such as; `Returns`, `Throws`, `Callback`, `When`, `Limit`,\n  `Expected`, `AsSequence` and `Proceed`\n- Verification of expected, setup and received calls including asserting no additional calls\n\n## Roadmap\n\n```\nConsidering = ❓ | Planned = 📅 | In-Progress = 🚧\n```\n\n- [❓] Setup and Verification of Event's\n- [❓] Configurable default return values instead of just `null` for reference and `default` for value types when\n  `Strict = false`\n\n\u003c!-- Badges --\u003e\n[gh-release-badge]: https://img.shields.io/github/v/release/DrBarnabus/Mimic?color=g\u0026style=for-the-badge\n[gh-release]: https://github.com/DrBarnabus/Mimic/releases/latest\n[nuget-downloads-badge]: https://img.shields.io/nuget/dt/Mimic?color=g\u0026logo=nuget\u0026style=for-the-badge\n[nuget-downloads]: https://www.nuget.org/packages/Mimic\n[gh-actions-badge]: https://img.shields.io/github/actions/workflow/status/DrBarnabus/Mimic/ci.yml?logo=github\u0026branch=main\u0026style=for-the-badge\n[gh-actions]: https://github.com/DrBarnabus/Mimic/actions/workflows/ci.yml\n[codecov-badge]: https://img.shields.io/codecov/c/github/DrBarnabus/Mimic?token=znImUftZNI\u0026style=for-the-badge\u0026logo=codecov\u0026logoColor=white\n[codecov]: https://codecov.io/gh/DrBarnabus/Mimic\n\n\u003c!-- Links --\u003e\n[changelog]: https://github.com/DrBarnabus/Mimic/blob/main/CHANGELOG.md\n[castle]: https://www.castleproject.org/projects/dynamicproxy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbarnabus%2Fmimic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrbarnabus%2Fmimic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbarnabus%2Fmimic/lists"}