aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/Helpers/TestClock.cs
blob: 12b320d38623235ad7cc7ca5d3623efc7ccf202e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
        }
    }
}