Skip to content

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

@ricardo-noyolalozano

Description

@ricardo-noyolalozano
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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions