public void FindDownRigthNeighbourThrowIndexOutOfRangeException() { // Arrange var grid = MockGrid.Context(); var gridService = new GridService(grid); var testedCellY = 1; var testedCellX = 3; // Act Action action = () => gridService.FindDownRigthNeighbour(testedCellY, testedCellX); // Assert action .Should() .Throw <IndexOutOfRangeException>(); }
public void FindDownRigthNeighbourShouldReturnRigthCell() { // Arrange var grid = MockGrid.Context(); var gridService = new GridService(grid); var testedCellY = 1; var testedCellX = 1; // Act var result = gridService.FindDownRigthNeighbour(testedCellY, testedCellX); // Assert result .Should() .BeEquivalentTo <Cell>(grid[2][2]); }