Beispiel #1
0
        public void TestCommandTurnCanExecuteInvalidBearing()
        {
            Robot robot = new Robot(2);

            robot.SetPosition(1, 2);

            var command = new TurnCommand(true);

            Assert.IsFalse(command.CanExecute(robot));
        }
Beispiel #2
0
        public void TestCommandTurnCanExecuteValid()
        {
            Robot robot = new Robot(2);

            robot.SetBearing("NORTH");

            var command = new TurnCommand(true);

            Assert.IsTrue(command.CanExecute(robot));
        }