Back
Close

Computing with Data

elgeish
576.6K views

Test Hooks - Part II

To properly test the use of the timestamp, we follow the dependency inversion principle again here and a test hook to set an instance of the Clock abstract class we use for generating the creation timestamp:

Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io