Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Test-driven development (TDD) example
@Test
public void verifyTimeDifferenceBetweenExpectedReportTimeAndActivityStartForNonPlacementVehicles() throws Throwable {
// increasing vehicle start time from current time by 2 hours
vehicleSteps.minutesShouldBeAddedOrDeletedToVehicleNodeTrackingId
(120, "added", 894440);
// end the duty for pilot 1435
pilotSteps.pilotIsOnDUTYOUT(1435L);
// end the duty for pilot 1448
pilotSteps.pilotIsOnDUTYOUT(1448L);
// end the duty for pilot 1422
pilotSteps.pilotIsOnDUTYOUT(1422L);
// execute auto allocation scheduler
commonSteps.executeAAScheduler();
// verify if pilot 1422 got assigned on vehicle HR55V1072
pilotSteps.verifyPilotActivityTablePilotShouldGetAssignedOnVehicleNodeTracking
(1422L, "HR55V1072", "be active");
// difference between expected report time and activity start should be 15 mins
pilotSteps.differenceBetweenExpectedReportTimeOfPilotAndActivityStartTimeOfVehicleShouldBeMinutes
(1422L, "HR55V1072", 15);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.