Ejemplo n.º 1
0
        public void TurnRobotRightTests(Direction initialDirection, Direction expectedDirection)
        {
            IRobot robot = new BattleRobot(0, 0, initialDirection);

            robot.TurnRight();

            Assert.AreEqual(expectedDirection, robot.GetPosition().Direction);
        }
Ejemplo n.º 2
0
        public void CreateBattleRobotTests(int x, int y, Direction direction)
        {
            IRobot robot = new BattleRobot(x, y, direction);

            Position position = robot.GetPosition();

            Assert.AreEqual(x, position.X);
            Assert.AreEqual(y, position.Y);
            Assert.AreEqual(direction, position.Direction);
        }
Ejemplo n.º 3
0
        public void MoveRobotTests(int initialX, int initialY, Direction direction, int expectedX, int expectedY)
        {
            IRobot robot = new BattleRobot(initialX, initialY, direction);

            robot.MoveForward();

            Position positon = robot.GetPosition();

            Assert.AreEqual(expectedX, positon.X);
            Assert.AreEqual(expectedY, positon.Y);
        }