You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mocking an interface that has a sealed implementation of a method #1334
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.
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.
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.
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.
Activity
stakx commentedon Mar 1, 2023
This has to happen over at DynamicProxy's repo, see their issue at castleproject/Core#447.
github-actions commentedon Aug 24, 2024
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.
weitzhandler commentedon Apr 1, 2025
Please add support for interface default implementation, not just
sealedmembers. For example:FormattedValueshould also work forMockBehavior.Strict.github-actions commentedon Sep 29, 2025
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.
weitzhandler commentedon Sep 29, 2025
This is a relatively new C# feature, but still important.
github-actions commentedon Mar 29, 2026
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.
github-actions commentedon Apr 28, 2026
This issue will now be closed since it has been labeled 'stale' without activity for 30 days.