0

We use RhinoMocks. I have a type into whose constructor 9 types are injected. I'd like a way of automocking the type, but being able to detect a particular method invocation on one of the injected objects (i.e. I only care about a single method invocation on one of the injected objects).

Is this possible, or do I have to manually inject all the mock objects into the constructor?

Ben Aston
  • 53,718
  • 65
  • 205
  • 331

2 Answers2

1

I haven't seen any frameworks that would auto-create these mocks for you. You can do it in your [SetUp] method, so at least the tests will not be cluttered with boilerplate code.

Grzenio
  • 35,875
  • 47
  • 158
  • 240
0

I need to check out http://autofixture.codeplex.com/. Its not really container specific, there is an extension for rhino mocks. Disclaimer: I haven't tried autofixture yet.

Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130