public void Given_CellCoordinate_When_HorizontalAndVerticalFibonacciNeighborsAreAboveThreshold_Expect_CorrectNeighborCount() { // Arrange var fibonacciSequenceService = new FibonacciNeighborService(); var fibonacciCheckerService = Mock.Of <IFibonacciCheckerService>(); Mock.Get(fibonacciCheckerService).Setup(service => service.IsFibonacci(It.IsAny <int>())).Returns(false); var grid = new Grid(fibonacciCheckerService); Mock.Get(fibonacciCheckerService).Setup(service => service.IsFibonacci(It.IsAny <int>())).Returns(true); var cellsToSetToTrue = new List <Tuple <int, int> >(); foreach (var i in Enumerable.Range(1, 9)) { cellsToSetToTrue.Add(Tuple.Create(20 + i, 25)); cellsToSetToTrue.Add(Tuple.Create(25, 20 + i)); } foreach (var(rowIndex, columnIndex) in cellsToSetToTrue) { grid.FibonacciGrid[rowIndex, columnIndex].IncrementGridCellValue(5); } var cellToCheck = new List <Tuple <int, int> > { Tuple.Create(25, 25) }; // Act var neighbors = fibonacciSequenceService.FindNeighbors(grid, cellToCheck); var horizontal = neighbors.First(); var vertical = neighbors.Skip(1).First(); // Assert Assert.AreEqual(9, horizontal.Count); Assert.AreEqual(9, vertical.Count); }