开发者

Help with some mocking

开发者 https://www.devze.com 2022-12-19 23:08 出处:网络
I was trying to mock an interface and I got the next expection: System.TypeLoadException:System.TypeLoadException: Signature开发者_如何学JAVA of the body and declaration in a method implementation d

I was trying to mock an interface and I got the next expection:

System.TypeLoadException: System.TypeLoadException: Signature开发者_如何学JAVA of the body and declaration in a method implementation do not match

I figured out later that my problem was a function that I have defined in my interface:

IList<T> GetAll<T>() where T : class, new();

Please could you tell me how to define the class so it would work with nmock2? Thanks in advance


the problem was my nmock2 version, I had 2 and when I replaced it with 1.x it worked.

0

精彩评论

暂无评论...
验证码 换一张
取 消