Example #1
0
        private static void PrintDifferentRoutes(List <Edge> edges, int number, char from, char to, int maxDistance)
        {
            var service = new TripService(edges);
            var routes  = service.GetRoutes(from, to, maxDistance);

            Print(number, routes.Count.ToString());
        }
Example #2
0
        public void GetRoutes_WithMaxDistanceThreshold(char from, char to, int maxDistance, int expected)
        {
            var service = new TripService(TestData.Edges);
            var routes  = service.GetRoutes(from, to, maxDistance);

            Assert.AreEqual(expected, routes.Count);
        }
Example #3
0
        private static void PrintExactMaxStops(List <Edge> edges, int number, char from, char to, int maxDepth)
        {
            var service = new TripService(edges);
            var routes  = service.GetRoutes(from, to, maxDepth, true);

            Print(number, routes.Count.ToString());
        }
Example #4
0
        public void GetRoutes_WithMaxOrExactMax(char from, char to, int max, bool isExactMax, int expected)
        {
            var service = new TripService(TestData.Edges);
            var routes  = service.GetRoutes(from, to, max, isExactMax);

            Assert.AreEqual(expected, routes.Count);
        }