I have a lot of experience using MOQ, while I recently came across AutoFixture. What are the differences between these structures?
FAQ explains the difference. In short
AutoFixture uses Reflection to create βgoodβ instances of public types. It automatically generates instances of other types, if necessary, to populate the arguments for the constructor, and also assigns values ββto the public write capabilities. Essentially, it just uses the requested public API type to create and populate. It does not do anything that you, as a developer, could not do manually - it just does it automatically for you.Unlike most Dynamic Mock libraries, derived from known types override the behavior of virtual members. Their goal is to test the behavior of the system under test (SUT).
AutoFixture uses Reflection to create βgoodβ instances of public types. It automatically generates instances of other types, if necessary, to populate the arguments for the constructor, and also assigns values ββto the public write capabilities. Essentially, it just uses the requested public API type to create and populate. It does not do anything that you, as a developer, could not do manually - it just does it automatically for you.
Unlike most Dynamic Mock libraries, derived from known types override the behavior of virtual members. Their goal is to test the behavior of the system under test (SUT).
You can combine AutoFixture with Moq to turn it into a container for startup .