public void NoNeighborsAreAliveIfEmptyUniverse()
        {
            var stateHolder = new Mock<IStateHolder>();
            stateHolder.Setup(sh => sh.GetState(It.IsAny<IPosition>())).Returns(new Dead());
            var position = new CartesianPosition(0, 0);

            var count = position.CountAliveNeighbors(stateHolder.Object);

            Assert.Equal(new AliveNeighborsCount(0), count);
        }
        public void AsksTheUniverseForAliveNeighborsCount()
        {
            var stateHolder = new Mock<IStateHolder>();
            stateHolder.Setup(sh => sh.GetState(It.IsAny<IPosition>())).Returns(new Alive());
            var position = new CartesianPosition(0,0);

            var count = position.CountAliveNeighbors(stateHolder.Object);

            stateHolder.Verify(sh => sh.GetState(new CartesianPosition(-1, -1)));
            stateHolder.Verify(sh => sh.GetState(new CartesianPosition(-1, 0)));
            stateHolder.Verify(sh => sh.GetState(new CartesianPosition(-1, 1)));
            stateHolder.Verify(sh => sh.GetState(new CartesianPosition(0, -1)));
            stateHolder.Verify(sh => sh.GetState(new CartesianPosition(0, 1)));
            stateHolder.Verify(sh => sh.GetState(new CartesianPosition(1, -1)));
            stateHolder.Verify(sh => sh.GetState(new CartesianPosition(1, 0)));
            stateHolder.Verify(sh => sh.GetState(new CartesianPosition(1, 1)));
            Assert.Equal(new AliveNeighborsCount(8), count);
        }