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); }
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); }
public void Execute(string[] cmdTokens = default) { var moveOutcome = _movementProcessor.Move(); var call = new Call(this, moveOutcome); _callStack.Push(call); }