You're right in the A<Foo>.Ignored
(or A<Foo>._
) is the equivalent of It.IsAny<Foo>
in Moq.
It seems that you've hit a bug if what you say is actually correct. I'll get on it as soon as possible.
EDIT
I created the following integration test to reproduced the bug but the test passes so I'm not able to reproduce it, could you provide a code sample?
[Test]
public void Should_fail_assertion_when_overload_with_no_parameters_has_been_called_but_the_assertion_is_for_overload_with_parameters_but_ignoring_them()
{
// Arrange
var fake = A.Fake<ITypeWithOverloadedMethods>();
// Act
fake.Foo();
// Assert
Assert.Throws<ExpectationException>(() => A.CallTo(() => fake.Foo(A<int>._)).MustHaveHappened());
}
public interface ITypeWithOverloadedMethods
{
void Foo();
void Foo(int argument);
}