mock.Verify(foo => foo.Submit(), Times.Once());
Somebody might accidentally write it as:
mock.Verify(foo => foo.Submit(), Times.Once);
Note the missing parentheses.
Is it worthwhile to create an overload that accepts Func<Times> in addition to Times? Then have that Verify method simply delegate to Verify like so:
public void Verify(Expression<Action<T>> expression, Func<Times> times)
{
Verify(expression, times());
}
--
Post: moq...@googlegroups.com
Unsubscribe: moqdisc-u...@googlegroups.com