AddMinutes() public method

public AddMinutes ( int minutes ) : MinuteRange
minutes int
return MinuteRange
Esempio n. 1
0
        public void AddMinutes() {
            var now = ClockProxy.Clock.Now;

            var m = new MinuteRange(now, TimeCalendar.NewEmptyOffset());
            var minuteTime = now.TrimToSecond();

            m.AddMinutes(-1).Start.Should().Be(minuteTime.AddMinutes(-1));
            m.AddMinutes(1).Start.Should().Be(minuteTime.AddMinutes(1));

            Enumerable
                .Range(-TimeSpec.MinutesPerHour * 2, TimeSpec.MinutesPerHour * 2)
                .RunEach(i => m.AddMinutes(i).Start.Should().Be(minuteTime.AddMinutes(i)));
        }
Esempio n. 2
0
        public void AddMinutes()
        {
            var now = ClockProxy.Clock.Now;

            var m          = new MinuteRange(now, TimeCalendar.NewEmptyOffset());
            var minuteTime = now.TrimToSecond();

            m.AddMinutes(-1).Start.Should().Be(minuteTime.AddMinutes(-1));
            m.AddMinutes(1).Start.Should().Be(minuteTime.AddMinutes(1));

            Enumerable
            .Range(-TimeSpec.MinutesPerHour * 2, TimeSpec.MinutesPerHour * 2)
            .RunEach(i => m.AddMinutes(i).Start.Should().Be(minuteTime.AddMinutes(i)));
        }
Esempio n. 3
0
        public void MextMinute()
        {
            var minute = new MinuteRange();

            minute.GetNextMinute().Should().Be(minute.AddMinutes(1));
        }
Esempio n. 4
0
        public void PreviousMinute()
        {
            var minute = new MinuteRange();

            minute.GetPreviousMinute().Should().Be(minute.AddMinutes(-1));
        }
Esempio n. 5
0
 public void MextMinute() {
     var minute = new MinuteRange();
     minute.GetNextMinute().Should().Be(minute.AddMinutes(1));
 }
Esempio n. 6
0
 public void PreviousMinute() {
     var minute = new MinuteRange();
     minute.GetPreviousMinute().Should().Be(minute.AddMinutes(-1));
 }