Ejemplo n.º 1
0
        public void Increment_hour_without_minutes_beyond_hours_per_day_resets_hours()
        {
            // Arrange
            var timeOfDay = new TimeOfDay(20, 0, 24);

            // Act
            timeOfDay.IncrementByHour(4);

            // Assert
            Assert.AreEqual(0, timeOfDay.Hour, "Hour value was not set.");
        }
Ejemplo n.º 2
0
        public void Increment_hour_with_minutes_within_hours_per_day_does_not_reset_hours()
        {
            // Arrange
            var timeOfDay = new TimeOfDay(20, 59, 24);

            // Act
            timeOfDay.IncrementByHour(3);

            // Assert
            Assert.AreEqual(23, timeOfDay.Hour, "Hour value was not set.");
        }
Ejemplo n.º 3
0
        public void Increment_hour_adds_hours()
        {
            // Arrange
            var timeOfDay = new TimeOfDay(5, 30);

            // Act
            timeOfDay.IncrementByHour(5);

            // Assert
            Assert.AreEqual(10, timeOfDay.Hour, "Hour value was not set.");
        }