public void GivenAnInvalidPixelPosition_WhenFillPixelIsCalled_ThenExceptionThrown() { _colourGridService = new GridService(4, _startIndexPosition); Assert.Throws <ApplicationException>(() => _colourGridService.FillPixel("red", new PixelPosition { X = 9, Y = 9 })); }
public void GivenAPixelPositionAndColour_WhenFillPixelIsCalled_PixelShouldBeExpectedColour() { _colourGridService = new GridService(4, _startIndexPosition); var expectedColour = "red"; var pixelPosition = new PixelPosition { X = 1, Y = 2 }; _colourGridService.FillPixel(expectedColour, pixelPosition); Assert.That(_colourGridService.GetPixelColour(pixelPosition), Is.EqualTo(expectedColour)); }