如何在StructureMap 3中使用MoqAutoMocker自动模拟器?

时间:2015-01-26 15:55:05

标签: moq structuremap3

我试图熟悉使用StructureMap进行单元测试,并试图使用看似随附的结合映射的Moq内置自动模拟器。我安装了NuGet包using the directions

Install-Package StructureMap

它安装和SM工作正常。存储库清楚has the MoqAutoMocker code in it,但 StructureMap.AutoMocker.Moq 命名空间无处可寻:

The object graph I see to demonstrate the AutoMocker implementations don't appear to exist.

我已经查看了几个让这看起来很容易做到的例子,但它们已经有几年的历史了,并且似乎专注于以前的SM版本,但我希望在那里&#39那是我还没看到的东西:

http://joelabrahamsson.com/setting-expectations-with-structuremaps-moqautomocker/ http://evolutionarydeveloper.blogspot.com/2012/10/automock-with-structuremap-and-moq.html

我有什么明显的遗失吗?

1 个答案:

答案 0 :(得分:1)

你需要structuremap.automocking.moq包。看看这个:http://www.nuget.org/packages?q=structuremap.automocking