Skip to content

Commit

Permalink
Update SharingFactorTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
luchengqi7 committed Dec 30, 2023
1 parent fe2a429 commit 5c9a46e
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void testDrtSharingFactorHandler() {
var requestId = Id.create(0, Request.class);
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId));

events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId, List.of(personId1), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId, List.of(personId1), null, null, 0, 0, 0, 0, 0, 0));
events.processEvent(new PassengerPickedUpEvent(100.0, mode, requestId, personId1, vehicleId));
events.processEvent(new PassengerDroppedOffEvent(300.0, mode, requestId, personId1, vehicleId));
events.flush();
Expand All @@ -62,8 +62,8 @@ public void testDrtSharingFactorHandler() {
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId1));
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId2));

events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId2, List.of(personId2), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1), null, null, 0, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId2, List.of(personId2), null, null, 0, 0, 0, 0, 0, 0));
events.processEvent(new PassengerPickedUpEvent(100.0, mode, requestId1, personId1, vehicleId));
events.processEvent(new PassengerDroppedOffEvent(300.0, mode, requestId1, personId1, vehicleId));
events.processEvent(new PassengerPickedUpEvent(300.0, mode, requestId2, personId2, vehicleId));
Expand Down Expand Up @@ -91,8 +91,8 @@ public void testDrtSharingFactorHandler() {
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId1));
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId2));

events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId2, List.of(personId2), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1), null, null, 0, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId2, List.of(personId2), null, null, 0, 0, 0, 0, 0, 0));
events.processEvent(new PassengerPickedUpEvent(100.0, mode, requestId1, personId1, vehicleId));
events.processEvent(new PassengerPickedUpEvent(200.0, mode, requestId2, personId2, vehicleId));
events.processEvent(new PassengerDroppedOffEvent(300.0, mode, requestId1, personId1, vehicleId));
Expand Down Expand Up @@ -121,8 +121,8 @@ public void testDrtSharingFactorHandler() {
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId1));
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId2));

events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId2, List.of(personId2), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1), null, null, 0, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId2, List.of(personId2), null, null, 0, 0, 0, 0, 0, 0));

events.processEvent(new PassengerPickedUpEvent(100.0, mode, requestId1, personId1, vehicleId));
events.processEvent(new PassengerPickedUpEvent(200.0, mode, requestId2, personId2, vehicleId));
Expand Down Expand Up @@ -152,8 +152,8 @@ public void testDrtSharingFactorHandler() {
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId1));
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId2));

events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId2, List.of(personId2), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1), null, null, 0, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId2, List.of(personId2), null, null, 0, 0, 0, 0, 0, 0));

events.processEvent(new PassengerPickedUpEvent(100.0, mode, requestId1, personId1, vehicleId));
events.processEvent(new PassengerPickedUpEvent(100.0, mode, requestId2, personId2, vehicleId));
Expand Down Expand Up @@ -182,7 +182,7 @@ public void testDrtSharingFactorHandler() {
var requestId1 = Id.create(0, Request.class);
Assertions.assertNull(sharingFactorTracker.getPoolingRates().get(requestId1));

events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1, personId2), null, null, 0, 0, 0, 0, 0));
events.processEvent(new DrtRequestSubmittedEvent(0.0, mode, requestId1, List.of(personId1, personId2), null, null, 0, 0, 0, 0, 0, 0));

events.processEvent(new PassengerPickedUpEvent(100.0, mode, requestId1, personId1, vehicleId));
events.processEvent(new PassengerPickedUpEvent(100.0, mode, requestId1, personId2, vehicleId));
Expand Down

0 comments on commit 5c9a46e

Please sign in to comment.