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