I have a recursive mock. I'm doing an arrangement on the child mock, but this has an unintended side effect in that the call count of the parent mock is incremented - this should not be happening.
public
interface
IMyInterface
{
IOther GetOther();
}
public
interface
IOther
{
int
Foo(
string
test);
}
[Fact]
public
void
TestMethod()
{
var myInterface = Mock.Create<IMyInterface>();
Mock.Assert(() => myInterface.GetOther(), Occurs.Never());
Mock.Arrange(() => myInterface.GetOther().Foo(
null
)).IgnoreArguments().Returns(1);
Mock.Assert(() => myInterface.GetOther(), Occurs.Never());
// BANG
}