Completed
Last Updated: 20 Mar 2014 12:38 by ADMIN
Stefan
Created on: 05 Jul 2013 06:58
Type: Feature Request
2
Future mocking should work correctly with recursive arrangements
I'd like to be able to make recursive arrangements like Mock.Arrange(() => a.B.C.D).Returns(5) and to simultaneously specify that this arrangement should work on any instance, not just 'a'. If I simply use IgnoreInstance() in this case it will make an arrangement for the instance on which 'D' is called and not 'B' - so it doesn't work as I want it to.

What I'd like to do is simply state Mock.Arrange(() => Arg.IsAny<IFoo>().B.C.D).Returns(5) - in other words "Arrange for any object of type IFoo, when ".B.C.D" is called on it, that the value of D is 5.
1 comment
ADMIN
Tsvetomir
Posted on: 20 Mar 2014 12:38
It is done in our latest release. Please, give it a try.