Пример #1
0
        public void TestMoveCommand(string commandText)
        {
            _mockMovementProcessor.Move().Returns(info => new ActionOutcome(OutcomeStatus.Success));
            var outcome = _executor.ExecuteCommand(commandText);

            _mockMovementProcessor.Received().Move();
            outcome.Result.ShouldBe(OutcomeStatus.Success);
        }
Пример #2
0
        public void TestSuccessfulMove(int xCoordinate, int yCoordinate, Orientation orientation)
        {
            _positionTracker.SetPosition(xCoordinate, yCoordinate);
            _positionTracker.SetOrientation(orientation);
            var outcome = _movementProcessor.Move();

            outcome.Result.ShouldBe(OutcomeStatus.Success);
        }
Пример #3
0
        public void Execute(string[] cmdTokens = default)
        {
            var moveOutcome = _movementProcessor.Move();
            var call        = new Call(this, moveOutcome);

            _callStack.Push(call);
        }