How to generate delegates from an interface? #1390
-
When performing my test, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
From what I tested, this seems like a bug while progressing in versions. I am using NSubstitute and if I basically do a 1:1 copy of your code using AutoNSubstituteCustomization it works like you expected it. I am quite sure the same thing should happen while using Moq and I guess it worked by the time the library was written. |
Beta Was this translation helpful? Give feedback.
-
Hello @kuuhakuDev, Perhaps the developers that implemented in the feature in AutoMoq couldn't do it at the time or considered it harmful. Either way I'll have to try to implement it to see if there are any blockers. |
Beta Was this translation helpful? Give feedback.
Hello @kuuhakuDev,
Apparently this scenario was never implemented in the Moq integration. Generic methods are explicitly ignored in Moq, however in other mocking libraries integrations the situation is the opposite.
Perhaps the developers that implemented in the feature in AutoMoq couldn't do it at the time or considered it harmful. Either way I'll have to try to implement it to see if there are any blockers.