示例#1
0
        public void Test1()
        {
            int input    = 1;
            int expected = 1;
            int result   = Reverse.Flip(input);

            Assert.AreEqual(expected, result);
        }
示例#2
0
        public void ReverseByOne(int startingXCoordinate, int startingYCoordinate, char direction, string expected)
        {
            CompassDirection?compassDirection = new DirectionFactory().Get(direction);

            IPosition robotStartPosition = new Position(startingXCoordinate, startingYCoordinate, compassDirection);

            ICommand robotCommand = new Reverse();

            IRobotController robotController = new RobotController(robotStartPosition);

            IPosition robotEndPosition = robotController.Move(robotCommand);

            Assert.That(robotEndPosition.ToString(), Is.EqualTo(expected));
        }