Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public void TestReportCommand(string commandText)
        {
            _mockPositionReporter.Report().Returns(info => new PositionReport());
            var outcome = _executor.ExecuteCommand(commandText);

            _mockPositionReporter.Received().Report();
            outcome.Result.ShouldBe(OutcomeStatus.Success);
        }
Esempio n. 3
0
        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}");
        }