Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In modern Java it’s pretty common to inject an application-level clock object in all components depending on time. Writing an unit test becomes easy, because you have full control over what time is returned on each call.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: