Пример #1
0
        public void ToggleShouldTurnOnAllLights_WhenAllLightsAreOff()
        {
            var christmasLightsGrid = new ChristmasLightsGrid();

            christmasLightsGrid.Toggle();

            christmasLightsGrid.NumberOfLightsOn.Should().Be(1000000);
        }
Пример #2
0
        public void TurnOnShouldTurnOnLights_AfterToggle()
        {
            var christmasLightsGrid = new ChristmasLightsGrid();

            christmasLightsGrid.TurnOn(0, 0, 998, 998);
            christmasLightsGrid.Toggle();

            christmasLightsGrid.TurnOn(1, 1, 16, 16);

            christmasLightsGrid.NumberOfLightsOn.Should().Be(2255);
        }
Пример #3
0
        public void ToggleShouldTurnOffAllOnLights_And_TurnOnAllOffLights()
        {
            var christmasLightsGrid = new ChristmasLightsGrid();

            christmasLightsGrid.TurnOn(1, 1, 16, 16);
            christmasLightsGrid.TurnOff(4, 8, 6, 10);

            christmasLightsGrid.Toggle();

            christmasLightsGrid.NumberOfLightsOn.Should().Be(999753);
        }