Example #1
0
        public void TestJourneyFromBuenosAiresViaCasablancaToLiverpool()
        {
            Assert.IsTrue(SearchAlgorithm.FindNextLeg(
                              new Route[2] {
                new Route(Casablanca, 5),
                new Route(Liverpool, 3)
            },
                              0,
                              Liverpool,
                              BuenosAires));

            Assert.AreEqual(8, SearchAlgorithm.FindNextLegDistance(
                                new Route[2] {
                new Route(Casablanca, 5),
                new Route(Liverpool, 3)
            },
                                0,
                                Liverpool,
                                BuenosAires));
        }
Example #2
0
        public void TestJourneyFromBuenosAiresViaNewYorkToLiverpool()
        {
            Assert.IsTrue(SearchAlgorithm.IsValidRoute(BuenosAires, Liverpool));
            Assert.AreEqual(10, SearchAlgorithm.FindRoute(BuenosAires, Liverpool));

            Assert.IsTrue(SearchAlgorithm.FindNextLeg(
                              new Route[2] {
                new Route(NewYork, 6),
                new Route(Liverpool, 4)
            },
                              0,
                              Liverpool,
                              BuenosAires));

            Assert.AreEqual(10, SearchAlgorithm.FindNextLegDistance(
                                new Route[2] {
                new Route(NewYork, 6),
                new Route(Liverpool, 4)
            },
                                0,
                                Liverpool,
                                BuenosAires));
        }