Unit testing
Finish the implementation of the Pizza Ordering System from yesterday including the extra challenges.
Now … does the code work properly? Have you tested it?
Write tests to verify that the system works as intended:
- the expected pizza objects are created with the Factory?
- and decorated with expected toppings?
- the delivery strategy works (including surcharge for express delivery)?
- and total price is calculated as expected with/without discount coupons?
Use:
- Normal Java class with a main method that can test the above scenarios. OR
- Use JUnit5 which is a framework made specifically for test of Java methods.