public void GivenAnFillColumnWithAColourAndStartPositionAndEndPosition_ThenPixelsAreColoured() { _colourGridService = new GridService(4, _startIndexPosition); var expectedColour = "red"; _colourGridService.FillColumn(expectedColour, 1, 1, 2); var grid = _colourGridService.GetGridContent(); Assert.That(grid[1, 1].Colour, Is.EqualTo(expectedColour)); Assert.That(grid[2, 1].Colour, Is.EqualTo(expectedColour)); }
public void GivenAPixelPositionWithAnOutOfBandEnd_WhenFillColumnIsCalled_ThenExceptionThrown() { _colourGridService = new GridService(4, _startIndexPosition); Assert.Throws <ApplicationException>(() => _colourGridService.FillColumn("red", 0, 0, 9)); }