automocking

Asserting a method invocation on one of several injected types

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...

How can I get StructureMap's AutoMocker to mock fake data?

I'm currently trying to implement StructureMap's AutoMocking functionality and I need help with getting the mocked . I have a Test method as follows: [Test] public void DirctoryResult_Returns_Groups() { var autoMocker = new RhinoAutoMocker<GroupController>(MockMode.AAA); GroupController controller = autoMocker.ClassUnderTest; ...

Mocking Func property of a class

Hi guys, one of my repository class (say PersonRepo) has a delegate as its property something like this private readonly Func<INameRepo> _nameRepo; and apart from this it is inherited by a class which itself expects one more object (say the session). Thus when i intialize this in my test I do something like var funcNameRepo=autoMock...