You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all, thank you very much for this masterpeace of software.
I think i found a bug in the verification of mocks, i assume that it is coming from late time binding of parameter invocation, but its just a assumtation.
Moq.MockException :
Expected invocation on the mock at least once, but was never performed: m => m.Transmit(1, [1, 2, 3], It.IsAny<byte[]>())
Performed invocations:
Mock<IHardware:3> (m):
IHardware.Transmit(1, [1, 2, 3], [0, 0, 0, 0, 0, 0, 0, 0])
I've created a minimal repo to reproduce the problem:
Hi @evilc0, I've taken a look. There is indeed an inconsistency in how Moq matches enumerable values (such as your byte[] arrays), depending on whether they are passed directly (as a constant) or returned from a method call. The PR linked above should rectify this.
Hello,
first of all, thank you very much for this masterpeace of software.
I think i found a bug in the verification of mocks, i assume that it is coming from late time binding of parameter invocation, but its just a assumtation.
Moq.Verify(m => m.MyMethod(Convert.FromBase64String(myArr)) wont match.
I've created a minimal repo to reproduce the problem:
https://github.com/evilc0/MoqBug
The text was updated successfully, but these errors were encountered: