Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ricardo-noyolalozano opened this issue Mar 1, 2023 · 1 comment

Comments

@ricardo-noyolalozano
Copy link

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.

@stakx
Copy link
Contributor

stakx commented Mar 1, 2023

This has to happen over at DynamicProxy's repo, see their issue at castleproject/Core#447.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants