When I try to verify a call to a method that takes an out parameter, Moq always
throws a VerificationException, reporting that the method was not called.
var mock = new Mock<Foo>(); // Foo has method DoSomething(out int)
int result;
mock.Object.DoSomething(out result);
mock.Verify(x => x.DoSomething(out result));
I also attempted to use strict behavior and provide a Setup call as described
in the quick start, with the same result:
var mock = new Mock<Foo>(MockBehavior.Strict);
int result = 5;
mock.Setup(x => x.DoSomething(out result));
mock.Object.DoSomething(out result);
mock.Verify(); // VerificationException
Original issue reported on code.google.com by br...@control-v.net on 21 Nov 2012 at 12:10
Original issue reported on code.google.com by
br...@control-v.net
on 21 Nov 2012 at 12:10