Hey all,
I'm trying to AssertWasCalled a certain method of a mocked (not stubbed) class, but the properties in it get reset to null.
I have:
Foo foo = MockRepository.GenerateMock<Foo>();
Foo_Accessor fooAccessor = Foo_Accessor.AttachShadow(foo) // It's a private property, so I set it with an Accessor
fooAccessor.Property = MockRepository.GenerateMock<PropertyClass>();
// Do stuff that makes a call in foo.Method()
// This stuff successfully runs foo.Method() with the foo.Property set as the proxy
foo.AssertWasCalled(x => x.Method(""), o => o.IgnoreArguments());
However, when it runs x.Method(""), it shows foo.Property as being null. Can I force-inject this property in the call? Or is there a way to permanently set it beforehand?
I think the fact that I have to use an Accessor.AttachShadow makes it more complicated...
Thanks for the help!
--Adam