This brings the total number of Auto-mocking extensions for AutoFixture up to five:
To install AutoFixture with Auto Mocking using Foq, run the following command in the Package Manager Console:
To use it, add an
AutoFoqCustomization to the
In the test below the mocked instance is created automatically by Foq:
The above test can be written declaratively using AutoData theories:
[AutoFoqData] attribute is defined as:
An automatically published release created from the latest successful build can be also downloaded from here.