Setup as so:
public interface IFoo
{
void Fizz();
}
[Test]
public void A()
{
var foo = new Mock(MockBehavior.Loose);
foo.Object.Fizz();
I have also witnessed the Times.Exactly(1) verification failure across unit tests using MoQ, with a "was called 2 times" error message. I see this as a bug in MoQ, as I would expect clean mock states on every test run.
My work around was to assign a new mock instance and test target in the test setup.
private Mock entityMapperMock;
private OverdraftReportMapper target;
[SetUp]
public void TestSetUp()
{
entityMapperMock = new Mock();
target = new OverdraftReportMapper(entityMapperMock.Object);
}