예제 #1
0
        public void TestFindRouteWhenMaxDepthReached()
        {
            RouteFinder limitedRouteFinder = Factory.CreateMockedRouteFinder(2);

            Flight[] route = limitedRouteFinder.FindRouteAsync("LINE_1", "LINE_4", CancellationToken.None).Result;
            Assert.IsNotNull(route);
            Assert.AreEqual(0, route.Length);

            route = routeFinder.FindRouteAsync("LINE_1", "LINE_4", CancellationToken.None).Result;
            Assert.IsNotNull(route);
            Assert.AreNotEqual(0, route.Length);
        }
예제 #2
0
 public void TestFindRouteForIncorrectAirports()
 {
     Flight[] route = routeFinder.FindRouteAsync("INCORRECT_AIRPORT_1", "INCORRECT_AIRPORT_2", CancellationToken.None).Result;
     Assert.IsNotNull(route);
     Assert.AreEqual(0, route.Length);
 }