public void MoveWest_Should_Move_Current_Coordinate_Appropriately(int currentX, int currentY, bool checkLegality, int expectedX, int expectedY)
        {
            var context = new MazeCrawlerContext
            {
                Start         = new Coordinates(currentX, currentY),
                NavigationMap = _moveMap,
                Coordinator   = Substitute.For <IMazeCrawlerCoordinator>()
            };
            var crawler = new MazeCrawler(context);

            crawler.MoveWest(checkLegality);

            crawler.CurrentX.Should().Be(expectedX);
            crawler.CurrentY.Should().Be(expectedY);
        }
        public void MoveWest_Should_Default_Unsupplied_Parameter_To_True(int x, int expectedX)
        {
            var context = new MazeCrawlerContext
            {
                Start         = new Coordinates(x, 0),
                NavigationMap = new Map(new char[][]
                {
                    new [] { Map.EMPTY, Map.EMPTY }
                }),
                Coordinator = Substitute.For <IMazeCrawlerCoordinator>()
            };
            var crawler = new MazeCrawler(context);

            crawler.MoveWest();

            crawler.CurrentX.Should().Be(expectedX);
        }
        public void MoveEast_Should_Not_BackTrack()
        {
            var context = new MazeCrawlerContext
            {
                Start         = new Coordinates(0, 0),
                NavigationMap = new Map(new char[][]
                {
                    new [] { Map.EMPTY, Map.EMPTY }
                }),
                Coordinator = Substitute.For <IMazeCrawlerCoordinator>()
            };
            var crawler = new MazeCrawler(context);

            crawler.MoveEast();
            crawler.MoveWest();

            crawler.CanMove(Direction.West).Should().BeFalse();
            crawler.CurrentX.Should().Be(1);
        }