public void PatrolRouteProposal_ConstructedWithPatrolRoute_UsesRoute()
        {
            var oldRoute = new PatrolRoute(new Path(new XYZ(0, 1, 0)), new Path(new XYZ(0, 0, 0)));
            var proposal = new PatrolRouteProposal(_map, oldRoute, path => { });

            var newRoute = proposal.Finalize();

            new RouteComparison(oldRoute, newRoute).EnsureMatches();
        }
        public void PatrolRouteProposal_AddNodeToExistingRoute_SegmentAddedCorrectly()
        {
            var oldRoute = new PatrolRoute(new Path(new XYZ(0, 0, 0), new XYZ(0, 1, 0)));
            var proposal = new PatrolRouteProposal(_map, oldRoute, path => { });

            proposal.AddPathToDestination(new XYZ(0, 2, 0));

            var route = proposal.Finalize();

            AssertRouteOrginsMatch(new List <XYZ> {
                new XYZ(0, 0, 0), new XYZ(0, 1, 0), new XYZ(0, 2, 0),
                new XYZ(0, 1, 0)
            }, route);
        }
        public void PatrolRouteProposal_MakeLoopPath_PathTravelsInLoop()
        {
            _routeProposal.AddPathToDestination(new XYZ(2, 0, 0));
            _routeProposal.AddPathToDestination(new XYZ(2, 2, 0));
            _routeProposal.AddPathToDestination(new XYZ(0, 2, 0));
            _routeProposal.AddPathToDestination(new XYZ(0, 0, 0));

            var route = _routeProposal.Finalize();


            AssertRouteMatches(new List <XYZ> {
                new XYZ(2, 0, 0), new XYZ(2, 2, 0), new XYZ(0, 2, 0), new XYZ(0, 0, 0)
            }, route);
        }