Parking is a simple Java software built using TDD. We are using test-first method to add or change features. We want ensure that all the business rules are covered before implement software details (database, web, ui, etc).
- Java
- Clean Code
- SOLID principles
- Domain-Driven Design
- KISS
- YAGNI
This project is being built in 3 phases:
- Phase 1 - Build domain layer and its unit tests.
- Phase 2 - Build application layer and tests.
- Phase 3 - Build infrastructure, integration and end-to-end (e2e) tests.
A parking can have different pricing according how much time car stay parked in. Pricing is defined by time periods and these time periods can be combined. So we are considering just 2 rules:
- Period until 1 hour: price is $1
- Period until 2 hours: price is $2
- Period until 12 hours: price is $10
- After 12 hours the price is added in $10 daily
Example:
- 3 hours: price is $10
- 14 hours: price is $20
- 3 days: price is $40
- Each hour has a fixed price ($5)
Example:
- 3 hours: price is $15
- 10 hours: price is $50
A application to simulate pricing.