Ejemplo n.º 1
0
        public void ShouldCalculateTheDistanceOfRoutesWithMultipleCities(string routeDescription, int expectedDistance)
        {
            var railroad = GivenA.RailRoadWithMultipleTracks();
            int distance = new DistanceEvaluator().MeasureTheDistance(railroad, Route.Parse(routeDescription));

            distance.Should().Be(expectedDistance);
        }
Ejemplo n.º 2
0
        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);
        }