Exemplo n.º 1
0
 public void TestJourneyFromBuenosAiresViaCapeTownToCasablanca()
 {
     SearchAlgorithm.FindNextLeg(
         new Route[2] {
         new Route(CapeTown, 4),
         new Route(Casablanca, 3)
     },
         0,
         Casablanca,
         BuenosAires);
 }
Exemplo n.º 2
0
 public void TestJourneyFromBuenosAiresViaCapeTownToNewYorkToLiverpoolToCasablanca()
 {
     Assert.IsTrue(SearchAlgorithm.FindNextLeg(
                       new Route[4] {
         new Route(CapeTown, 4),
         new Route(NewYork, 8),
         new Route(Liverpool, 4),
         new Route(Casablanca, 3)
     },
                       0,
                       Casablanca,
                       BuenosAires));
 }
Exemplo n.º 3
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));
        }
Exemplo n.º 4
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));
        }