public void EnoughDrivers_SimultaneousTrips() { Logger.Log("Test_TripLifeCycle_EnoughDrivers_SimultaneousTrips"); 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_SimultaneousTripLifecycle_ForAllPartnerFleets(new List <Partner>() { lib.partner }); }
public void EnoughDrivers_SimultaneousTrips() { Logger.Log("Test_TripLifeCycle_EnoughDrivers_SimultaneousTrips"); 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_SimultaneousTripLifecycle_ForAllPartnerFleets(new List <Partner>() { lib.partner }); 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_SimultaneousTrips_AllowTimeForDriversToBecomeAvailable() { Logger.Log("NotEnoughDrivers_SimultaneousTrips_AllowTimeForDriversToBecomeAvailable"); /* 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/LocalTripsNotEnoughDriversSimultaneous.txt", tripthru: new GatewayServer("EmptyGateway", "EmptyGateway"), maxLateness: new TimeSpan(0, 10, 0)); lib.Test_SimultaneousTripLifecycle_ForAllPartnerFleets(new List <Partner>() { lib.partner }); }
public void NotEnoughDrivers_SimultaneousTrips_AllowTimeForDriversToBecomeAvailable() { Logger.Log("NotEnoughDrivers_SimultaneousTrips_AllowTimeForDriversToBecomeAvailable"); /* 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/LocalTripsNotEnoughDriversSimultaneous.txt", tripthru: tripthru, maxLateness: new TimeSpan(0, 10, 0)); lib.Test_SimultaneousTripLifecycle_ForAllPartnerFleets(new List <Partner>() { lib.partner }); 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_SimultaneousTrips_VerifyRejected() { Logger.Log("NotEnoughDrivers_SimultaneousTrips_VerifyRejected"); /* 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 * */ //GatewayServer gatewayServer = new GatewayServer("EmptyGateway", "EmptyGateway"); var tripthru = new TripThru(enableTDispatch: false); Test_TripLifeCycle_Base lib = new Test_TripLifeCycle_Base( filename: "Test_Configurations/LocalTripsNotEnoughDriversSimultaneous.txt", tripthru: tripthru, maxLateness: new TimeSpan(0, 1, 0)); lib.Test_SimultaneousTripLifecycle_ForAllPartnerFleets(new List<Partner>() { lib.partner }); 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 EnoughDrivers_SimultaneousTrips() { Logger.Log("Test_TripLifeCycle_EnoughDrivers_SimultaneousTrips"); 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_SimultaneousTripLifecycle_ForAllPartnerFleets(new List<Partner>() { lib.partner }); 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_SimultaneousTrips_AllowTimeForDriversToBecomeAvailable() { Logger.Log("NotEnoughDrivers_SimultaneousTrips_AllowTimeForDriversToBecomeAvailable"); /* 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/LocalTripsNotEnoughDriversSimultaneous.txt", tripthru: new GatewayServer("EmptyGateway", "EmptyGateway"), maxLateness: new TimeSpan(0, 10, 0)); lib.Test_SimultaneousTripLifecycle_ForAllPartnerFleets(new List<Partner>(){lib.partner}); }
public void EnoughDrivers_SimultaneousTrips() { Logger.Log("Test_TripLifeCycle_EnoughDrivers_SimultaneousTrips"); 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_SimultaneousTripLifecycle_ForAllPartnerFleets(new List<Partner>() { lib.partner }); }