This course has already ended.

⌛⌛⌛ JUnit tests for order

Place your code into the subdirectory Round11/junitorder/src/test/java/fi/tuni/prog3/junitorder. Fetch task material from student_template_project.

This task concerns implementing JUnit tests for a class Order (and its inner classes Item and Entry). Documentation for these classes is provided in the subdirectory apidocs of the task material.

Your task is to implement fairly comprehensive JUnit tests that seek to verify that the classes Order, Order.Item and Order.Entry work as specified in the documentation.

The nature of this task is somewhat similar to test-driven development, where test developers do not have access to the actual tested impelemtation and the tests are developed based on e.g. API documentation.

In order to be able to implement and test the JUnit tests, you might need to implement at least some kind of class Order (which naturally also entails the inner classes Item and Entry).


The automated tests first execute your JUnit tests for (presumably) correct implementations of Order, Order.Item and Order.Entry. The JUnit tests are then executed also for 20 different incorrect implementations. If your JUnit tests do not claim to find errors from the correct implementation, you will get 2 points for each incorrect implementation that your JUnit tests find incorrect.

The incorrect implementations do not contain any really obscure bugs: each of them contradicts with at least some expected behaviour that has been defined clearly in the documentation.

A+ presents the exercise submission form here.

Posting submission...