News for hackers. Stuff that matters.
Re:Testing Without Mocks: A Pattern Language by pharmakom on Sunday January 08, 2023 @05:08AM (#34297727)
I would use a mock for the wrapped instance that generates a strong random value on each call to “Get”.

Then I would do some basic unit tests and maybe property based testing given that the only way for the same value to appear on subsequent “Get” calls is for caching to have occurred.

There are no comments on this comment yet.