aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/Helpers/TestClock.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-18 16:21:39 +0800
committercrupest <crupest@outlook.com>2020-06-18 16:21:39 +0800
commit3e471ac783d91fcc61a90b759fecefe3b80014ba (patch)
tree7821cc512b7262954f4981042dcf599768e068f4 /Timeline.Tests/Helpers/TestClock.cs
parent3dc9460798798e5ba155fae7b6afe84522c2c619 (diff)
downloadtimeline-3e471ac783d91fcc61a90b759fecefe3b80014ba.tar.gz
timeline-3e471ac783d91fcc61a90b759fecefe3b80014ba.tar.bz2
timeline-3e471ac783d91fcc61a90b759fecefe3b80014ba.zip
Add last modified info to timeline.
Diffstat (limited to 'Timeline.Tests/Helpers/TestClock.cs')
-rw-r--r--Timeline.Tests/Helpers/TestClock.cs23
1 files changed, 23 insertions, 0 deletions
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;
+ }
+ }
+}