I want to mock this interface:
interface IA {
IB DoSomething(IC arg)
}
in a way that simulates an implementation like this:
class A : IA {
public IB DoSomething(IC arg) { return new B(arg); }
}
How can I do that? From other similar questions, it's supposed to be something like this:
MockRepository.GenerateMock<IA>().Expect(x => x.DoSomething(null)).IgnoreArguments().Callback<IC>(arg => new B(arg))
But i can't get it to work. I'm using RhinoMocks 3.6