{"id":13594373,"url":"https://github.com/RandomEngy/UnitTestBoilerplateGenerator","last_synced_at":"2025-04-09T07:31:54.790Z","repository":{"id":44963358,"uuid":"332263886","full_name":"RandomEngy/UnitTestBoilerplateGenerator","owner":"RandomEngy","description":"An extension for Visual Studio that generates a unit test boilerplate from a given class, setting up mocks for all dependencies. Supports NUnit, Visual Studio Test, XUnit and many mock frameworks.","archived":false,"fork":false,"pushed_at":"2023-12-06T14:54:00.000Z","size":1705,"stargazers_count":63,"open_issues_count":6,"forks_count":17,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-02T16:52:02.067Z","etag":null,"topics":["roslyn","unit-testing","visual-studio-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=RandomEngy.UnitTestBoilerplateGenerator","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/RandomEngy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2021-01-23T17:08:09.000Z","updated_at":"2024-06-30T20:33:40.000Z","dependencies_parsed_at":"2022-07-13T12:50:28.255Z","dependency_job_id":"41bc8284-ded0-4f53-b3eb-666f6c7cdbc6","html_url":"https://github.com/RandomEngy/UnitTestBoilerplateGenerator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RandomEngy%2FUnitTestBoilerplateGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RandomEngy%2FUnitTestBoilerplateGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RandomEngy%2FUnitTestBoilerplateGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RandomEngy%2FUnitTestBoilerplateGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RandomEngy","download_url":"https://codeload.github.com/RandomEngy/UnitTestBoilerplateGenerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223375314,"owners_count":17135348,"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":["roslyn","unit-testing","visual-studio-extension"],"created_at":"2024-08-01T16:01:32.536Z","updated_at":"2024-11-06T16:31:15.595Z","avatar_url":"https://github.com/RandomEngy.png","language":"C#","funding_links":[],"categories":["C#","C\\#"],"sub_categories":[],"readme":"# Unit Test Boilerplate Generator\n\n[![Build status](https://ci.appveyor.com/api/projects/status/7ecfxkoe7sj4nw5h?svg=true)](https://ci.appveyor.com/project/RandomEngy/unittestboilerplategenerator)\n[![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/RandomEngy.UnitTestBoilerplateGenerator)](https://marketplace.visualstudio.com/items?itemName=RandomEngy.UnitTestBoilerplateGenerator)\n[![Visual Studio Marketplace Rating](https://img.shields.io/visual-studio-marketplace/r/RandomEngy.UnitTestBoilerplateGenerator)](https://marketplace.visualstudio.com/items?itemName=RandomEngy.UnitTestBoilerplateGenerator)\n[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/RandomEngy.UnitTestBoilerplateGenerator)](https://marketplace.visualstudio.com/items?itemName=RandomEngy.UnitTestBoilerplateGenerator)\n\nDownload this extension from the [VS Marketplace](https://marketplace.visualstudio.com/items?itemName=RandomEngy.UnitTestBoilerplateGenerator)\nor get the [CI build](http://vsixgallery.com/extension/UnitTestBoilerplate.RandomEngy.ca0bb824-eb5a-41a8-ab39-3b81f03ba3fe/).\n\n---------------------------------------\n\nGenerates a unit test boilerplate from a given C# class, setting up mocks for all dependencies and test outlines for all public methods.\n\nTest frameworks supported:\n* Visual Studio\n* NUnit\n* xUnit\n\nMock frameworks supported:\n* FakeItEasy\n* JustMock\n* Moq + AutoMoq\n* NSubstitute\n* Rhino Mocks\n* SimpleStubs\n\nDependency injection modes supported:\n* Constructor injection via any IoC framework\n* Property injection via Unity, Ninject or Grace\n\nRight click an item in Solution Explorer and choose \"Create Unit Test Boilerplate\" .\n\n![Before Screenshot](BeforeScreenshot.png)\n\nThis will create a test class in the same relative path as the class in a specified unit test project.\nAll the dependencies are mocked and saved as fields which are created fresh for each test via [TestInitialize]. In addition, all public methods\non the tested class are set up with a test method outline:\n\n![After Screenshot](AfterScreenshot.png)\n\nEach mocking framework has its own pattern.\n\n## Other features\n* Customize the unit test output via templates: Go to Options \u003e Unit Test Boilerplate Generator \u003e Templates\n\n![Options Screenshot](OptionsScreenshot.png)\n\n[Supported format tokens documentation](https://github.com/RandomEngy/UnitTestBoilerplateGenerator/wiki/Custom-Format-Tokens)\n\n* Supports mocking generic interfaces\n* Automatically brings in appropriate using statements\n* Applies any user-specific formatting rules to the generated code\n* Automatically detects which mocking library and test framework you're using\n\nSee the [changelog](https://github.com/RandomEngy/UnitTestBoilerplateGenerator/blob/master/CHANGELOG.md) for changes and roadmap. If you'd like to see support for other mocking\nframeworks or other IoC frameworks, [open an issue](https://github.com/RandomEngy/UnitTestBoilerplateGenerator/issues/new).\n\n## Contribute\nCheck out the [contribution guidelines](https://github.com/RandomEngy/UnitTestBoilerplateGenerator/blob/master/CONTRIBUTING.md)\nif you want to contribute to this project.\n\nFor cloning and building this project yourself, make sure\nto install the\n[Extensibility Tools](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ExtensibilityTools)\nextension for Visual Studio which enables some features\nused by this project.\n\n## License\n[MIT](https://github.com/RandomEngy/UnitTestBoilerplateGenerator/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRandomEngy%2FUnitTestBoilerplateGenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRandomEngy%2FUnitTestBoilerplateGenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRandomEngy%2FUnitTestBoilerplateGenerator/lists"}