public void ShouldIdentifyIfTheTrackConnectTheGivenCities() { var origin = new City("A"); var destination = new City("B"); var otherCity = new City("C"); var track = new Track(origin, destination, 4); track.IsAConnectionBetween(origin, destination).Should().BeTrue(); track.IsAConnectionBetween(origin, otherCity).Should().BeFalse(); }
protected override bool ShouldKeepRunningInThisRoute(RouteWithDistanceFromStart runningRoute, Track track) { return !(runningRoute.DistanceFromStart >= distanceLimit); }
protected override bool ShouldKeepRunningInThisRoute(RouteWithDistanceFromStart runningRoute, Track track) { return !(runningRoute.Cities.Contains(track.Destination) && !track.Destination.Equals(FinalDestination)); }
private bool ThisTrackWillLeadMeToDestination(Track track) { return track.Destination.Equals(FinalDestination); }
protected abstract bool ShouldKeepRunningInThisRoute(RouteWithDistanceFromStart runningRoute, Track track);