Пример #1
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);
        }
Пример #2
0
        public void TestOrientation(Orientation newOrientation)
        {
            positionTracker.SetOrientation(newOrientation);
            Orientation currentOrientation = positionTracker.GetOrientation();

            currentOrientation.ShouldBe(newOrientation);
        }
Пример #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}");
        }