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