2

I'm trying to get familiar with unit testing with StructureMap, and am attempting to use the built-in auto mocker for Moq that appears to come with StructureMap. I installed the NuGet package using the directions

Install-Package StructureMap

and it installed and SM working fine. The repository clearly has the MoqAutoMocker code in it, but the StructureMap.AutoMocker.Moq namespace is nowhere to be found:

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

I've checked out several examples that make this seem very easy to do, but they're a couple years old and seem focused on previous versions of SM, but I'm hopeful there's just something I don't see yet:

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

Is there something obvious I'm missing here?

Sam Storie
  • 4,444
  • 4
  • 48
  • 74
  • 1
    You'll need structuremap.automocking.moq package. Check this out: [http://www.nuget.org/packages?q=structuremap.automocking](http://www.nuget.org/packages?q=structuremap.automocking) – nzic Jan 26 '15 at 21:12
  • Sure enough it was that obvious! If you want to change this comment to be an answer I'd be happy to mark it as accepted. Thanks! – Sam Storie Jan 27 '15 at 13:15

1 Answers1

1

You'll need structuremap.automocking.moq package. Check this out: http://www.nuget.org/packages?q=structuremap.automocking

nzic
  • 184
  • 9