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
SamlClient provides a way of mocking the timestamp using setInstantNow, which works just fine.
However, the standard way of mocking time in Java 8+ is to supply a Clock instance, which allows more flexibility, and eliminates the need of 'special' methods being exposed only for testing.
So, the suggestion here is perhaps SamlClient could expose setClock instead, which would be safe for calling both in production and test code.
The text was updated successfully, but these errors were encountered:
SamlClient
provides a way of mocking the timestamp usingsetInstantNow
, which works just fine.However, the standard way of mocking time in Java 8+ is to supply a
Clock
instance, which allows more flexibility, and eliminates the need of 'special' methods being exposed only for testing.So, the suggestion here is perhaps
SamlClient
could exposesetClock
instead, which would be safe for calling both in production and test code.The text was updated successfully, but these errors were encountered: