Exemple #1
0
        public void InvalidCommand()
        {
            var inputProcessor = new InputProcessor(Robot, Board);

            var invalidCommand = "INVALIDINPUT";

            Assert.Equal(inputProcessor.ProcessInput(invalidCommand), InputErrors.RobotNotPlaced(invalidCommand));
        }
Exemple #2
0
        public void NoOtherRobotCommandsValidUntilRobortPlace()
        {
            var inputProcessor = new InputProcessor(Robot, Board);

            Assert.Equal(inputProcessor.ProcessInput(ValidInputs.Move), InputErrors.RobotNotPlaced(ValidInputs.Move));
            Assert.Equal(inputProcessor.ProcessInput(ValidInputs.Left), InputErrors.RobotNotPlaced(ValidInputs.Left));
            Assert.Equal(inputProcessor.ProcessInput(ValidInputs.Right), InputErrors.RobotNotPlaced(ValidInputs.Right));
            Assert.Equal(inputProcessor.ProcessInput(ValidInputs.Report), InputErrors.RobotNotPlaced(ValidInputs.Report));
        }