Created
June 6, 2018 18:07
-
-
Save shankybnl/b1fcdd16f3092dbb0f21e4501cbc3526 to your computer and use it in GitHub Desktop.
Test-driven development (TDD) example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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