public void ShouldCalcuteTheCostOfASimpleRouteFrom_CityTo_City(string routeDescription, int expectedDistance) { var railroad = GivenA.RailRoadWithMultipleTracks(); var route = Route.Parse(routeDescription); int distance = new DistanceEvaluator().MeasureTheDistance(railroad, route); distance.Should().Be(expectedDistance); }
public RailRoadService(RailRoadFactory railRoadFactory, RailRoadIOService railRoadIoService, DistanceEvaluator distanceEvaluator, LimitedStopsRouteFinder limitedStopsRouteFinder, ExactNumberStopsRouteFinder exactNumberStopsRouteFinder, DistanceOfShortestRouteFinder shortestRoutesFinder, NumberOfRoutesWithDistanceLimitFinder numberOfRoutesWithDistanceLimitFinder) { this.railRoadFactory = railRoadFactory; this.railRoadIoService = railRoadIoService; this.distanceEvaluator = distanceEvaluator; this.limitedStopsRouteFinder = limitedStopsRouteFinder; this.exactNumberStopsRouteFinder = exactNumberStopsRouteFinder; this.shortestRoutesFinder = shortestRoutesFinder; this.numberOfRoutesWithDistanceLimitFinder = numberOfRoutesWithDistanceLimitFinder; }
public void ShouldCalculateTheDistanceOfRoutesWithMultipleCities(string routeDescription, int expectedDistance) { var railroad = GivenA.RailRoadWithMultipleTracks(); int distance = new DistanceEvaluator().MeasureTheDistance(railroad, Route.Parse(routeDescription)); distance.Should().Be(expectedDistance); }