When writing unit tests for any code that uses dependency injection, and when using a mocking framework, we need to declare and inject any dependency we have. This is repetitive and boring code to write, especially on classes with many dependencies. AutoMock solves this by creating mocks/stubs on the fly for a given class together with an instance of it.
Install-Package AutoMock -Version 126.96.36.199
dotnet add package AutoMock --version 188.8.131.52
<PackageReference Include="AutoMock" Version="184.108.40.206" />
paket add AutoMock --version 220.127.116.11
Creates mocks/stubs on the fly for any class under test that depends on a set of dependencies through constructor based dependency injection.
Currently supports RhinoMocks.
- RhinoMocks (>= 3.6.1)