Ejemplo n.º 1
0
        private String Test2()
        {
            //Navigate to http://adam.goucher.ca/parkcalc/index.php
            ParkingCalculation calculation = new ParkingCalculation();

            //Select the Long­ Term Surface Parking ​option from the Choose a Lot d​ropdown
            calculation.ParkingLot("Long-Term Surface Parking");

            //Click on the Calendar Icon ​in the Choose Entry Date and Time s​ection
            //Select 01 / 01 / 2014 ​in the new window that appears
            calculation.entryDetails.Date(1, 1, 2014);

            //Click on the Calendar Icon ​in the Choose Leaving Date and Time s​ection
            //Select 02 / 01 / 2014 ​in the new window that appears
            calculation.leavingDetails.Date(1, 2, 2014);

            //Click Calculate
            calculation.Submit();

            //Check that the COST ​is equal to $ 270.00
            //Check that the duration of stay is equal to (31 Days, 0 Hours, 0 Minutes)
            if (calculation.ParkingDuration("(31 Days, 0 Hours, 0 Minutes)") && calculation.FinalCost("$ 270.00"))
            {
                return "-";
            }
            else
            {
                return "FAILED";
            }
        }
Ejemplo n.º 2
0
        private String Test1()
        {
            //Navigate to http://adam.goucher.ca/parkcalc/index.php
            ParkingCalculation calculation = new ParkingCalculation();

            //Select the Short­Term Parking​ option from the Choose a Lot d​ropdown
            calculation.ParkingLot("Short-Term Parking");

            //Enter 10:00​ and 01 / 01 / 2014 ​in the Choose Entry Date and Time s​ection
            calculation.entryDetails.Time("10:00");
            calculation.entryDetails.Date("01/01/2014");

            //Select the PM ​option in the Choose Entry Date and Time ​section
            calculation.entryDetails.AMPM("pm");

            //Enter 11:00​ and 01 / 01 / 2014 ​in the Choose Leaving Date and Time s​ection
            calculation.leavingDetails.Time("11:00");
            calculation.leavingDetails.Date("01/01/2014");

            //Select the PM ​option in the Choose Leaving Date and Time s​ection
            calculation.leavingDetails.AMPM("pm");

            //Click Calculate
            calculation.Submit();

            //Check that the COST ​is equal to $ 2.00
            //Check that the duration of stay is equal to (0 Days, 1 Hours, 0 Minutes)
            if (calculation.ParkingDuration("(0 Days, 1 Hours, 0 Minutes)") && calculation.FinalCost("$ 2.00"))
            {
                return "-";
            }
            else
            {
                return "FAILED";
            }
        }