Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Incompleted() {
- Parking<TestClock> parking(10);
- TestClock::SetNow(20);
- parking.Park({'B', 'B', 222, 'B', 99});
- TestClock::SetNow(40);
- assert(parking.GetCurrentBill({'B', 'B', 222, 'B', 99}) == 200);
- TestClock::SetNow(60);
- assert(parking.GetCurrentBill({'B', 'B', 222, 'B', 99}) == 400);
- }
- void TestContainers() {
- Parking<TestClock> parking(10);
- TestClock::SetNow(10);
- parking.Park({'A', 'A', 111, 'A', 99});
- TestClock::SetNow(20);
- parking.Withdraw({'A', 'A', 111, 'A', 99});
- parking.Park({'B', 'B', 222, 'B', 99});
- TestClock::SetNow(40);
- assert(parking.GetCurrentBill({'A', 'A', 111, 'A', 99}) == 100);
- assert(parking.GetCurrentBill({'B', 'B', 222, 'B', 99}) == 200);
- parking.Park({'A', 'A', 111, 'A', 99});
- TestClock::SetNow(60);
- assert(parking.GetCurrentBill({'A', 'A', 111, 'A', 99}) == 300);
- assert(parking.GetCurrentBill({'B', 'B', 222, 'B', 99}) == 400);
- assert(parking.GetCurrentBill({'C', 'C', 333, 'C', 99}) == 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement