Open Waog opened 9 years ago
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:
Stub
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.
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:This are only 3 lines for this simple example, but becomes really nasty for bigger interfaces.