Skip to content

Feature request: allow mocking interfaces that inherit from other interfaces #1

@m-celikba

Description

@m-celikba

The following does not work:

[assembly: Mock<IItfDerived>]

public interface IItfBase
{
    void Method1();
}

public interface IItfDerived : IItfBase
{
    void Method2();
}

and produces this compile error:
error CS0535: 'ItfDerivedMock.@class' does not implement interface member 'IItfBase.Method1()'

Looking at the tests, it seems this is not tested so I guess it is not supported ?
Please consider adding support for this scenario.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions