Skip to content

Mocking Interfaces #5

Description

@Waog

It would be a nice convenient method to create mocks interfaces the same way, one can do it for classes.

Currently I have to introduce some class in my tests, to pass it to the Stub constructor, because it can't handle no-constructor-types:

    class MyMockingInterfaceClass implements MyInterface {
        someMethod() {throw "method should be replaced by mock"}
    }

This are only 3 lines for this simple example, but becomes really nasty for bigger interfaces.

Activity

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

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