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
A common use-case is the one in which my client implementation attempts multiple times to contact a server, retrying the call in case the server is momentarily unavailable.
I was not able to find a way to create something like this
In this example, the withStatus() method would accept a lambda instead of a value, and I can, therefore, use it to unit test my algorithm which retries failure calls.
This behaviour can be made possible by extending the ResponseStubbing interface by letting it receive Java Suppliers instead of actual values. E.g.
The concrete implementation would then lazily compute them when returning values to the tester instead of being eagerly filled with setters at creation time
The text was updated successfully, but these errors were encountered:
A common use-case is the one in which my client implementation attempts multiple times to contact a server, retrying the call in case the server is momentarily unavailable.
I was not able to find a way to create something like this
In this example, the
withStatus()
method would accept a lambda instead of a value, and I can, therefore, use it to unit test my algorithm which retries failure calls.This behaviour can be made possible by extending the
ResponseStubbing
interface by letting it receive Java Suppliers instead of actual values. E.g.The concrete implementation would then lazily compute them when returning values to the tester instead of being eagerly filled with setters at creation time
The text was updated successfully, but these errors were encountered: