Install Node JS 18 LTS & install yarn globally. Run yarn install for the first time before running any commands.
yarn test
Scenario is written in scenarios/mallSmallParkingLot.test.ts
Run below commmand to see the result
yarn test:mallSmallParkingLot
Scenario is written in scenarios/mallParkingLot.test.ts
Run below commmand to see the result
yarn test:mallParkingLot
Scenario is written in scenarios/stadiumParkingLot.test.ts
Run below commmand to see the result
yarn test:stadiumParkingLot
Scenario is written in scenarios/airportParkingLot.test.ts
Run below commmand to see the result
yarn test:airportParkingLot
- Concurrency handling (Optimistic Locking or Pessimistic Locking) is not in scope.
- Small vehicle can only take small spot, medium and large vehicle can only take spot in their size as well, it is feasible to make the change on spotAllocationService though
- Database Transaction is not in scope
- Repository layer normally should be tested in Component Test as it requires working with local database. Here it is covered by Unit Test as no database is invloved.
- Ticket number and auto increment are handled in repository/database layer




