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.

There is a newer version of this package available.
See the version list below for details.
Install-Package AutoMock -Version
dotnet add package AutoMock --version
<PackageReference Include="AutoMock" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AutoMock --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AutoMock,"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Release Notes

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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on AutoMock:

Repository Stars
API plugin for nopCommerce

Version History

Version Downloads Last updated 32,275 5/18/2016 3,661 2/13/2016