From ddfd4cedaf696e6ad19f40bec4db0f9d0e28dc65 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 18 Jun 2020 16:21:39 +0800 Subject: Add last modified info to timeline. --- Timeline.Tests/Helpers/TestClock.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Timeline.Tests/Helpers/TestClock.cs (limited to 'Timeline.Tests/Helpers/TestClock.cs') diff --git a/Timeline.Tests/Helpers/TestClock.cs b/Timeline.Tests/Helpers/TestClock.cs new file mode 100644 index 00000000..7febc0fe --- /dev/null +++ b/Timeline.Tests/Helpers/TestClock.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Timeline.Services; + +namespace Timeline.Tests.Helpers +{ + public class TestClock : IClock + { + private DateTime? _currentTime = null; + + public DateTime GetCurrentTime() + { + return _currentTime ?? DateTime.Now; + } + + public void SetCurrentTime(DateTime? mockTime) + { + _currentTime = mockTime; + } + } +} -- cgit v1.2.3