https://github.com/leeocoder/rent-car-tdd-bdd
https://github.com/leeocoder/rent-car-tdd-bdd
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/leeocoder/rent-car-tdd-bdd
- Owner: leeocoder
- Created: 2021-12-01T02:43:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-07T02:01:26.000Z (over 4 years ago)
- Last Synced: 2025-01-13T09:46:32.981Z (over 1 year ago)
- Language: JavaScript
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Story: Renting a car
## Use Case 01
As a system user
In order to get an available car in a specific category
Given a car category containing 3 different cars
When I check if there's a car available
Then it should choose randomly a car from the category chosen
## Use Case 02
As a system user
In order to calculate the final renting price
Given a customer who wants to rent a car for 5 days
And he is 50 years old
When he chooses a car category that costs $37.6 per day
Then I must add the Tax of his age which is 30% to the car category price
Then the final formula will be `((price per day * Tax) * number of days)`
And the final result will be `((37.6 * 1.3) * 5)= 244.4`
And the final price will be printed in Brazilian Portuguese format as "R$ 244,40"
## Use Case 03
As a system user
In order to register a renting transaction
Given a registered customer who is 50 years old
And a car model that costs $37.6 per day
And a delivery date that is for 05 days behind
And given an actual date 05/11/2020
When I rent a car I should see the customer data
And the car selected
And the final price which will be R$ 244,40
And DueDate which will be printed in Brazilian Portuguese format "10 de Novembro de 2020"