Example #1
0
        public void EnoughDrivers_SingleTrips()
        {
            Logger.Log("Test_TripLifeCycle_EnoughDrivers_SingleTrips");
            Test_TripLifeCycle_Base lib = new Test_TripLifeCycle_Base("Test_Configurations/LocalTripsEnoughDrivers.txt",
                                                                      tripthru: new GatewayServer("EmptyGateway", "EmptyGateway"),
                                                                      maxLateness: new TimeSpan(0, 5, 0));

            lib.Test_SingleTripLifecycle_ForAllPartnerFleets();
        }
Example #2
0
        public void EnoughDrivers_SingleTrips()
        {
            Logger.Log("Test_TripLifeCycle_EnoughDrivers_SingleTrips");
            var tripthru = new TripThru(enableTDispatch: false);
            Test_TripLifeCycle_Base lib = new Test_TripLifeCycle_Base("Test_Configurations/LocalTripsEnoughDrivers.txt",
                                                                      tripthru: tripthru,
                                                                      maxLateness: new TimeSpan(0, 5, 0));

            lib.Test_SingleTripLifecycle_ForAllPartnerFleets();
            Assert.AreEqual(lib.partner.distance.lastHour.Value, tripthru.distance.lastHour.Value, "Distances are different");
            Assert.AreEqual(lib.partner.fare.lastHour.Value, tripthru.fare.lastHour.Value, "Fares are different");
        }
Example #3
0
        public void NotEnoughDrivers_SingleTrips()
        {
            Logger.Log("Test_TripLifeCycle_NotEnoughDrivers_SingleTrips");

            /* In this test since there are not enough drivers it tries to dispatch to tripthru --
             * which has an empty implementation that always rejects.
             * We expect an assertion error because we expect the trip status to change from Queued to Dispatched
             * */
            Test_TripLifeCycle_Base lib = new Test_TripLifeCycle_Base(
                filename: "Test_Configurations/LocalTripsNotEnoughDrivers.txt",
                tripthru: new GatewayServer("EmptyGateway", "EmptyGateway"),
                maxLateness: new TimeSpan(0, 1, 0));

            lib.Test_SingleTripLifecycle_ForAllPartnerFleets();
        }
Example #4
0
        public void NotEnoughDrivers_SingleTrips()
        {
            Logger.Log("Test_TripLifeCycle_NotEnoughDrivers_SingleTrips");

            /* In this test since there are not enough drivers it tries to dispatch to tripthru --
             * which has an empty implementation that always rejects.
             * We expect an assertion error because we expect the trip status to change from Queued to Dispatched
             * */
            var tripthru = new TripThru(enableTDispatch: false);
            Test_TripLifeCycle_Base lib = new Test_TripLifeCycle_Base(
                filename: "Test_Configurations/LocalTripsNotEnoughDrivers.txt",
                tripthru: tripthru,
                maxLateness: new TimeSpan(0, 1, 0));

            lib.Test_SingleTripLifecycle_ForAllPartnerFleets();
            Assert.AreEqual(lib.partner.distance.lastHour.Value, tripthru.distance.lastHour.Value, "Distances are different");
            Assert.AreEqual(lib.partner.fare.lastHour.Value, tripthru.fare.lastHour.Value, "Fares are different");
        }
Example #5
0
        public void NotEnoughDrivers_SingleTrips()
        {
            Logger.Log("Test_TripLifeCycle_NotEnoughDrivers_SingleTrips");
            /* In this test since there are not enough drivers it tries to dispatch to tripthru --
             * which has an empty implementation that always rejects.
             * We expect an assertion error because we expect the trip status to change from Queued to Dispatched
             * */
            var tripthru = new TripThru(enableTDispatch: false);
            Test_TripLifeCycle_Base lib = new Test_TripLifeCycle_Base(
                filename: "Test_Configurations/LocalTripsNotEnoughDrivers.txt",
                tripthru: tripthru,
                maxLateness: new TimeSpan(0, 1, 0));

            lib.Test_SingleTripLifecycle_ForAllPartnerFleets();
            Assert.AreEqual(lib.partner.distance.lastHour.Value, tripthru.distance.lastHour.Value, "Distances are different");
            Assert.AreEqual(lib.partner.fare.lastHour.Value, tripthru.fare.lastHour.Value, "Fares are different");
        }
Example #6
0
 public void EnoughDrivers_SingleTrips()
 {
     Logger.Log("Test_TripLifeCycle_EnoughDrivers_SingleTrips");
     var tripthru = new TripThru(enableTDispatch: false);
     Test_TripLifeCycle_Base lib = new Test_TripLifeCycle_Base("Test_Configurations/LocalTripsEnoughDrivers.txt",
         tripthru: tripthru,
         maxLateness: new TimeSpan(0, 5, 0));
     lib.Test_SingleTripLifecycle_ForAllPartnerFleets();
     Assert.AreEqual(lib.partner.distance.lastHour.Value, tripthru.distance.lastHour.Value, "Distances are different");
     Assert.AreEqual(lib.partner.fare.lastHour.Value, tripthru.fare.lastHour.Value, "Fares are different");
 }
        public void NotEnoughDrivers_SingleTrips()
        {
            Logger.Log("Test_TripLifeCycle_NotEnoughDrivers_SingleTrips");
            /* In this test since there are not enough drivers it tries to dispatch to tripthru --
             * which has an empty implementation that always rejects.
             * We expect an assertion error because we expect the trip status to change from Queued to Dispatched
             * */
            Test_TripLifeCycle_Base lib = new Test_TripLifeCycle_Base(
                filename: "Test_Configurations/LocalTripsNotEnoughDrivers.txt",
                tripthru: new GatewayServer("EmptyGateway", "EmptyGateway"),
                maxLateness: new TimeSpan(0, 1, 0));

            lib.Test_SingleTripLifecycle_ForAllPartnerFleets();
        }
 public void EnoughDrivers_SingleTrips()
 {
     Logger.Log("Test_TripLifeCycle_EnoughDrivers_SingleTrips");
     Test_TripLifeCycle_Base lib = new Test_TripLifeCycle_Base("Test_Configurations/LocalTripsEnoughDrivers.txt",
         tripthru: new GatewayServer("EmptyGateway", "EmptyGateway"),
         maxLateness: new TimeSpan(0, 5, 0));
     lib.Test_SingleTripLifecycle_ForAllPartnerFleets();
 }