This project has been build following the Vinted instructions here
The project uses Kotlin to bring a simple discount system with oop + functional programming paradigm into practice.
# For running project on the root directory execute:
$ ./gradlew build
$ ./gradlew run
- CoR: the discount system uses chain of responsibility to route shipment and apply discount on each entry.
- Service Locator: is used as means of providing dependencies for the whole application.
There are a bunch of tests available that mostly have been written in test driven style
- Unit Tests: for DAO and Rule classes
- Approval Testing: for Processor class
# For running tests on the root directory execute:
$ ./gradlew test
As requested no additional dependencies have been added beside Kotlin standard library and testing libs.
- Mockk: mocking objects while unit testing a class
- JUnit5: Unit testing
- approvaltests: approval testing
- test-logger: to pretty print test outputs run in cli mode.