Ejemplo n.º 1
0
        public void ShouldGetAListOfPossibleRoutesFromCityToCityInAComplexRailRoad(string origin, string destination, int maximumStops, int possibleRoutes)
        {
            var railroad = GivenA.RailRoadWithMultipleTracks();
            var routes   = new LimitedStopsRouteFinder().Find(railroad, new City(origin), new City(destination), maximumStops);

            routes.Should().Be(possibleRoutes);
        }
Ejemplo n.º 2
0
        public void ShouldReturnZeroRoutesIfTheDestinationIsALeaf()
        {
            var railroad = GivenA.SimpleRailRoad();
            var routes   = new LimitedStopsRouteFinder().Find(railroad, new City("A"), new City("C"), 10);

            routes.Should().Be(0);
        }