public void Only_allowed_commands_are_returned()
        {
            // Arrange
            var timeOfDay = new TimeOfDay(5, 30);

            // Act
            timeOfDay.DecrementByMinute(15);

            // Assert
            timeOfDay.Minute.Should().Be(15, "the minute was decremented by 15, from 30 minutes.");
        }
Example #2
0
        public void Decrement_by_minute_removes_hour_if_minute_reaches_zero()
        {
            // Arrange
            var timeOfDay = new TimeOfDay(5, 30);

            // Act
            timeOfDay.DecrementByMinute(31);

            // Assert
            timeOfDay.Should().Be(new TimeOfDay(4, 59), "the time of day was not equal to 4:59, after decrementing 31 minutes.");
        }
Example #3
0
        public void Decrement_by_minute_removes_minutes_from_property()
        {
            // Arrange
            var timeOfDay = new TimeOfDay(5, 30);

            // Act
            timeOfDay.DecrementByMinute(15);

            // Assert
            timeOfDay.Minute.Should().Be(15, "the minute was decremented by 15, from 30 minutes.");
        }
        public void Decrement_by_minute_removes_minutes_from_property()
        {
            // Arrange
            var timeOfDay = new TimeOfDay(5, 30);

            // Act
            timeOfDay.DecrementByMinute(15);

            // Assert
            Assert.AreEqual(15, timeOfDay.Minute, "The minute value was not set.");
        }
        public void Decrement_by_minute_removes_hour_if_minute_reaches_zero()
        {
            // Arrange
            var timeOfDay = new TimeOfDay(5, 30);

            // Act
            timeOfDay.DecrementByMinute(31);

            // Assert
            Assert.AreEqual(59, timeOfDay.Minute, "The minute value was not set.");
            Assert.AreEqual(4, timeOfDay.Hour, "The hour value was not set.");
        }