コード例 #1
0
        public void CanAddPositiveTime()
        {
            TimeOfDay startTime = new TimeOfDay(12, 0);
            TimeOfDay actual = startTime.AddHours(13);
            TimeOfDay expected = new TimeOfDay(1, 0);

            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void CanAddNegativeTime()
        {
            TimeOfDay startTime = new TimeOfDay(12, 0);
            TimeOfDay actual    = startTime.AddHours(-13);
            TimeOfDay expected  = new TimeOfDay(23, 0);

            Assert.Equal(expected, actual);
        }