Exemplo n.º 1
0
        public void ShouldGenerateTheCorrectOutput(int value, string expectedValue)
        {
            var generator = new RowGeneratorYellowLamp();
            var result    = generator.Generate(value);

            Assert.That(result, Is.EqualTo(expectedValue));
        }
        public void ShouldReturnTheRightValue(int hours, int minutes, int seconds, string expectedResult)
        {
            var topFirstRow     = new RowGeneratorTopFirst();
            var topSecondRow    = new RowGeneratorTopSecond();
            var bottomFirstRow  = new RowGeneratorBottomFirst();
            var bottomSecondRow = new RowGeneratorBottomSecond();
            var yellowLampGen   = new RowGeneratorYellowLamp();

            var clock  = new BerlinClock(topFirstRow, topSecondRow, bottomFirstRow, bottomSecondRow, yellowLampGen);
            var result = clock.Generate(hours, minutes, seconds);

            Assert.That(result, Is.EqualTo(expectedResult));
        }