Beispiel #1
0
        public void BeepCommandTest()
        {
            var      rf      = new RobotFactory(new Robot());
            ACommand command = new BeepCommand(rf);
            string   result  = command.Execute();

            Assert.AreEqual(result, "BEEP >> True");
        }
Beispiel #2
0
        public void TurnCommandTestInvalid()
        {
            var rf = new RobotFactory(new Robot());

            rf.SetArgument = 450;
            ACommand command = new TurnCommand(rf);
            string   result  = command.Execute();

            Assert.AreEqual(result, "TURN 450 >> False");
        }
Beispiel #3
0
        public void MoveCommandTestInvalid()
        {
            var rf = new RobotFactory(new Robot());

            rf.SetArgument = -100;
            ACommand command = new MoveCommand(rf);
            string   result  = command.Execute();

            Assert.AreEqual(result, "MOVE -100 >> False");
        }