public void Execute(string[] cmdTokens = default) { var positionReport = _positionReporter.Report(); var outcome = new ReportOutcome(OutcomeStatus.Success, positionReport.ToString(), positionReport); _callStack.Push(new Call(this, outcome)); }
public void TestReportCommand(string commandText) { _mockPositionReporter.Report().Returns(info => new PositionReport()); var outcome = _executor.ExecuteCommand(commandText); _mockPositionReporter.Received().Report(); outcome.Result.ShouldBe(OutcomeStatus.Success); }
public void TestPositionReport(int xCoordinate, int yCoordinate, Orientation orientation) { positionTracker.SetPosition(xCoordinate, yCoordinate); positionTracker.SetOrientation(orientation); var report = positionReporter.Report(); report.ToString().ShouldBe($"{xCoordinate},{yCoordinate},{orientation}"); }