test_parkinglot
Test Parking lot's vehicle entry and exit scenarios.
TestNearestSpotAssigned
¶
Test Case: to verify if nearest spot to entrance is assigned
Source code in parking_lot/tests/test_parkinglot.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
test_nearest_spots_assigned(num_spots, parking_lot, vehicles, park_vehicles)
¶
Two vehicles should be issued spots at two ends of spots, closest to entry
Source code in parking_lot/tests/test_parkinglot.py
181 182 183 184 185 186 187 188 189 190 191 192 |
|
test_num_free_spots_after_vehicle_entrance(num_vehicles, num_spots, parking_lot)
¶
Unit Test to verify number of free spots is updated after vehicle's entry.
Source code in parking_lot/tests/test_parkinglot.py
194 195 196 197 198 199 |
|
TestOneVehicleNoSpotAvailable
¶
Test Case: to verify vehicle entry denial if no spot is available
Source code in parking_lot/tests/test_parkinglot.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
|
test_num_free_spots_after_vehicle_entrance(num_vehicles, num_spots, parking_lot)
¶
Unit Test to verify number of free spots is updated after vehicle's entry.
Source code in parking_lot/tests/test_parkinglot.py
150 151 152 153 154 155 |
|
test_vehicle_entry_denied(parking_lot, vehicles, park_vehicles)
¶
Unit test to verify vehicle entry is denied when no spot is available
Source code in parking_lot/tests/test_parkinglot.py
145 146 147 148 |
|
TestOneVehicleSpotAvailable
¶
Tests: 1. Ticket issued to vehicle entry with spot available. 2. Number of free spots reduces by 1.
Source code in parking_lot/tests/test_parkinglot.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
test_num_free_spots_after_vehicle_entrance(num_vehicles, num_spots, parking_lot)
¶
Unit Test to verify number of free spots is updated after vehicle's entry.
Source code in parking_lot/tests/test_parkinglot.py
133 134 135 136 137 138 |
|
test_vehicle_ticket_issued(parking_lot, vehicles, park_vehicles)
¶
Unit test to verify vehicle entry when spot is available
Source code in parking_lot/tests/test_parkinglot.py
128 129 130 131 |
|
TestTwoVehicleOneSpotAvailable
¶
Test Case: to verify 2 vehicles entry concurrently
Source code in parking_lot/tests/test_parkinglot.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
|
test_num_free_spots_after_vehicle_entrance(num_vehicles, num_spots, parking_lot)
¶
Unit Test to verify number of free spots is updated after vehicle's entry.
Source code in parking_lot/tests/test_parkinglot.py
169 170 171 172 173 174 |
|
test_vehicle_entry_denied(parking_lot, vehicles, park_vehicles)
¶
One vehicle should be issued ticket, other should be denied entry
Source code in parking_lot/tests/test_parkinglot.py
162 163 164 165 166 167 |
|