示例#1
0
        public void CanCalculateDuration_OverMidnight()
        {
            TimeOfDay startTime = new TimeOfDay(23, 0);
            TimeOfDay endTime   = new TimeOfDay(1, 0);

            TimeSpan duration = TimeOfDay.CalculateDuration(startTime, endTime);

            Assert.Equal(TimeSpan.FromHours(2), duration);
        }