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_AddInvalidDestination_ExceptionThrown() { _layer[1, 1].Put(_obstacle); ExceptionAssert.Throws <InvalidPathException>(() => _routeProposal.AddPathToDestination(new XYZ(1, 1, 0))); }