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
The idea is to let the codegen generates clients stubs for tests freeing users from defining it by hand. Especially useful for services with many many methods.
There are two types of stubs that can be generated. One that throws exceptions and one that always returns the default instance of the return message.
I opened the original Lightbend support ticket requesting this. Thanks for opening here.
I think just throwing is fine. I'm trying to think why we used the Empty pattern, and can't remember a compelling reason. I just tried replacing Empty with Unimplemented in a couple places and it works fine.
One more consideration: in some cases we've also found it useful to have an object and/or method as follows:
It might also be useful to throw a custom exception, roughly, final class AkkaGrpcStubNotImplementedException extends NotImplementedError, to make it more obvious that a stubbable, unimplemented method was called.
The idea is to let the codegen generates clients stubs for tests freeing users from defining it by hand. Especially useful for services with many many methods.
There are two types of stubs that can be generated. One that throws exceptions and one that always returns the default instance of the return message.
The users could then override only the methods they are interested in for their test leaving the others simply untouched.
The text was updated successfully, but these errors were encountered: