Home > Software > Development > Testing > Unit Test Boilerplate Generator
Details
- Package ID
- unit-test-boilerplate-generator
- Version
- 2.4.0
- Downloads
- 1248
- Website
- https://marketplace.visualstudio.com/items?itemName=RandomEngy.UnitTestBoilerplateGenerator
Summary
Generates a unit test boilerplate from a given C# class
Description
Generates a unit test boilerplate from a given C# class, setting up mocks for all dependencies and test outlines for all public methods.
Test frameworks supported:
- Visual Studio
- NUnit
- xUnit
Mock frameworks supported:
- Moq
- AutoMoq
- NSubstitute
- SimpleStubs
- Rhino Mocks
Dependency injection modes supported:
- Constructor injection via any IoC framework
- Property injection via Unity, Ninject or Grace
Right click an item in Solution Explorer and choose “Create Unit Test Boilerplate” .
This will create a test class in the same relative path as the class in a specified unit test project. All the dependencies are mocked and saved as fields which are created fresh for each test via [TestInitialize]. In addition, all public methods on the tested class are set up with a test method outline:
Each mocking framework has its own pattern.
Comments
Loading comments...