devlooped / moq

The most popular and friendly mocking framework for .NET
Other
5.92k stars 801 forks source link

Mocking an interface that has a sealed implementation of a method #1334

Open ricardo-noyolalozano opened 1 year ago

ricardo-noyolalozano commented 1 year ago
public interface MyInterface
{
    public sealed Task SealedMethod(Foo foo) => UnsealedMethod(foo.Name);
}

When I mock this interface and inject into the class I am testing, I get an exception thrown about it missing the sealed method. I was wondering whether there would be any support for this kind of interface.

Back this issue Back this issue

stakx commented 1 year ago

This has to happen over at DynamicProxy's repo, see their issue at https://github.com/castleproject/Core/issues/447.

github-actions[bot] commented 2 months ago

Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.