What is AutoFixture AutoMoq?

旧时模样 提交于 2019-12-03 06:29:04

问题


I was looking at nuget and wanted to import moq when I noticed AutoFixture AutoMoq. I see that AutoFixture is to help write TDD faster but I can't find any examples of AutoMoq and how it is different then AutoFixture.

Can someone point me to this AutoMoq so I can see what it is doing.


回答1:


In short, AutoFixture.AutoMoq is an extension that turns AutoFixture into an Auto-Mocking Container using the Moq dynamic mock library.

There's also a similar extension for AutoFixture that enables auto-mocking with Rhino Mocks.

This article introduces auto-mocking for AutoFixture: http://blog.ploeh.dk/2010/08/19/AutoFixtureAsAnAutomockingContainer.aspx.

Here's a couple of follow-ups:

  • http://blog.ploeh.dk/2010/08/25/ChangingTheBehaviorOfAutoFixtureAutomockingWithMoq.aspx
  • http://blog.ploeh.dk/2010/11/13/RhinoMocksbasedAutomockingWithAutoFixture.aspx


来源:https://stackoverflow.com/questions/4845065/what-is-autofixture-automoq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!