예제 #1
0
        public void GivenMove_WhenNextPosition_ThenMovement()
        {
            var robot = new State.ToyRobot();

            robot.Place(1, 1, RobotDirection.South);


            robot.Move();

            robot.PositionX.Should().Be(1);
            robot.PositionY.Should().Be(0);
        }
예제 #2
0
        public void GivenMove_WhenNoNextPosition_ThenNoMovement()
        {
            var robot = new State.ToyRobot();

            robot.Place(1, 1, RobotDirection.East);
            robot.Direction = null;

            robot.Move();

            robot.PositionX.Should().Be(1);
            robot.PositionY.Should().Be(1);
        }