aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/Helpers/TestClock.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-11-20 18:21:17 +0800
committerGitHub <noreply@github.com>2019-11-20 18:21:17 +0800
commitae5bb5cbef2aec94673e26712d7937fca3996f5b (patch)
tree788b8acdf1141c757cb3226d3cd5f64594386b8f /Timeline.Tests/Helpers/TestClock.cs
parent37a2e6340ab20de1f9e847d795c0cbec9846de97 (diff)
parentca87f6781a5b0e80989a66be338a699846c40f8d (diff)
downloadtimeline-ae5bb5cbef2aec94673e26712d7937fca3996f5b.tar.gz
timeline-ae5bb5cbef2aec94673e26712d7937fca3996f5b.tar.bz2
timeline-ae5bb5cbef2aec94673e26712d7937fca3996f5b.zip
Merge pull request #54 from crupest/timeline
Add core feature Timeline (currently only personal timeline)
Diffstat (limited to 'Timeline.Tests/Helpers/TestClock.cs')
-rw-r--r--Timeline.Tests/Helpers/TestClock.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Timeline.Tests/Helpers/TestClock.cs b/Timeline.Tests/Helpers/TestClock.cs
new file mode 100644
index 00000000..12b320d3
--- /dev/null
+++ b/Timeline.Tests/Helpers/TestClock.cs
@@ -0,0 +1,15 @@
+using System;
+using Timeline.Services;
+
+namespace Timeline.Tests.Helpers
+{
+ public class TestClock : IClock
+ {
+ public DateTime? MockCurrentTime { get; set; } = null;
+
+ public DateTime GetCurrentTime()
+ {
+ return MockCurrentTime.GetValueOrDefault(DateTime.Now);
+ }
+ }
+}