Example #1
0
 private void ResetTime()
 {
     SecondsRow       = SecondsColor.None;
     FirstHoursRow    = new HoursColor[4];
     SecondHoursRow   = new HoursColor[4];
     FirstMinutesRow  = new MinutesColor[11];
     SecondMinutesRow = new MinutesColor[4];
 }
        public void ThenLamsShouldTurnedOnCorrectlyTest(int hours,
                                                        HoursColor colorOfFirstLampColor = HoursColor.None, HoursColor colorOfSecondLampColor = HoursColor.None,
                                                        HoursColor colorOfThirdLampColor = HoursColor.None, HoursColor colorOfForthLampColor  = HoursColor.None)
        {
            // Arrange
            const int anyMinutes = 34;
            const int anySeconds = 34;
            var       clock      = new Domain.BerlinClock();

            // Act
            clock.SetTime(hours, anyMinutes, anySeconds);

            // Assert
            Assert.That(clock.FirstHoursRow[0], Is.EqualTo(colorOfFirstLampColor));
            Assert.That(clock.FirstHoursRow[1], Is.EqualTo(colorOfSecondLampColor));
            Assert.That(clock.FirstHoursRow[2], Is.EqualTo(colorOfThirdLampColor));
            Assert.That(clock.FirstHoursRow[3], Is.EqualTo(colorOfForthLampColor));
        }