Beispiel #1
0
        public void Move_RobotIn0_0_N_RobotIn0_1_N_XIs1()
        {
            var robot = new ToyRobot();

            robot.Place(0, 0, Domain.Direction.North);
            var nextPosition = robot.CalculateNextPosition();

            Assert.Equal(1, nextPosition.Y);
        }
Beispiel #2
0
        public void Move_RobotIn0_0_N_RobotIn0_1_N_DirectionIsNorth()
        {
            var robot = new ToyRobot();

            robot.Place(0, 0, Domain.Direction.North);
            var newPosition = robot.CalculateNextPosition();

            robot.Place(newPosition.X, newPosition.Y);
            Assert.Equal(Domain.Direction.North, robot.CurrentDirection);
        }