Пример #1
0
        public void TestMagnitudeSeconds2()
        {
            var entry = new DeltaTimePresenter(TimeSpan.FromSeconds(2));

            entry.ToString().Should().Be("+2 sec");

            entry = new DeltaTimePresenter(-TimeSpan.FromSeconds(2));
            entry.ToString().Should().Be("-2 sec");
        }
Пример #2
0
        public void TestMagnitudeMinutes2()
        {
            var entry = new DeltaTimePresenter(TimeSpan.FromMinutes(2));

            entry.ToString().Should().Be("+2 min");

            entry = new DeltaTimePresenter(-TimeSpan.FromMinutes(2));
            entry.ToString().Should().Be("-2 min");
        }
Пример #3
0
        public void TestMagnitudeDays1()
        {
            var entry = new DeltaTimePresenter(TimeSpan.FromDays(1));

            entry.ToString().Should().Be("+1 day");

            entry = new DeltaTimePresenter(-TimeSpan.FromDays(1));
            entry.ToString().Should().Be("-1 day");
        }
Пример #4
0
        public void TestMagnitudeHours2()
        {
            var entry = new DeltaTimePresenter(TimeSpan.FromHours(2));

            entry.ToString().Should().Be("+2 hours");

            entry = new DeltaTimePresenter(-TimeSpan.FromHours(2));
            entry.ToString().Should().Be("-2 hours");
        }
Пример #5
0
        public void TestMagnitudeMilliseconds1()
        {
            var entry = new DeltaTimePresenter(TimeSpan.FromMilliseconds(1));

            entry.ToString().Should().Be("+1 ms");

            entry = new DeltaTimePresenter(-TimeSpan.FromMilliseconds(1));
            entry.ToString().Should().Be("-1 ms");
        }