This project is a very basic example used to illustrate how unit test frameworks integrate.
The entry point is PricingService, which is in charge of providing a price for an article reference. A catalogue provides article details. A discount policy decides if/which discount is applicable.
Maven build is customized so that plugins run automatically.
- initialize phase: Jacoco prepares agent for unit tests
- test: Surefire runs unit tests
- pre-integration-test: Jacoco prepares agent for integration tests
- integration-test: Failsafe runs integration tests
- integration-test: Pitest generates report for unit tests
- post-integration-test: Jacoco generates report for integration tests
- verify: Jacoco generates report for unit tests
- verify: JGiven generates report
This project implements tests with both JUnit4 and Jupiter. Supporting both impacts Maven configuration a lot.
Besides, this support is not complete, as Maven plugin for Pitest does not support Jupiter yet.
- Run tests from IDE / Maven build