public void FindTripMinHopSimpleGraphOneHopReturnOk_Plane()
        {
            planner.AddTravelCompany(rotcB);
            var     trip   = planner.FindTrip(A, E, FindOptions.MinimumHops, TransportType.Plane);
            ILegDTO legDTO = createdLegs[new Key(rotcBName, A, E)];

            Assert.AreEqual(legDTO.Cost, trip.TotalCost);
            Assert.AreEqual(legDTO.Distance, trip.TotalDistance);
            Assert.AreEqual(A, trip.From);
            Assert.AreEqual(E, trip.To);
            Assert.That(trip.Path, Is.EquivalentTo(new[] { legDTO }));
        }
 public void FindTripNullFromThrowsException()
 {
     Assert.Throws <ArgumentNullException>(() => planner.FindTrip(null, B, FindOptions.MinimumCost, TransportType.Bus));
 }
Beispiel #3
0
        public void FromEqualsToEmpty_MinHop()
        {
            ITrip trip = Planner.FindTrip(A, A, MinimumHops, Bus);

            Assert.IsEmpty(trip.Path);
            Assert.AreEqual(0, trip.TotalCost);
            Assert.AreEqual(0, trip.TotalDistance);
            Assert.AreEqual(A, trip.From);
            Assert.AreEqual(A, trip.To);
        }