What steps will reproduce the problem?
1. I create a mock of the following class which contains a method using a
generic T of type struct.
public interface ITest
{
void Call<T>(T e) where T : struct;
}
2. I try to verify the call
var mock = new Mock<ITest>();
var test = mock.Object;
test.Call(12D);
mock.Verify(f=>f.Call(12), Times.Once());
What is the expected output? What do you see instead?
I expect that the verification is positive but it fails.
What version of the product are you using? On what operating system?
4.0.10827
Please provide any additional information below.
1. If the parameter T is defined on class/interface level the problem does not
occurrs.
public interface ITest<T> where T : struct
2. Without generics it also works.
Original issue reported on code.google.com by Sven.Kro...@googlemail.com on 28 Nov 2012 at 12:15
Original issue reported on code.google.com by
Sven.Kro...@googlemail.com
on 28 Nov 2012 at 12:15