fbpx

Testing time-based code with Joda Time

In some systems you sometimes need to record date or timestamp of given action. Good example could be comments system, where each comment has timestamp: In our experiment we will perform two test cases: So how can we manipulate time in unit test? Inject time provider to system under test That’s probably the most desirable […]