Task description

The aim of this task is to practise unit tests creation with JUnit.

Coding Conventions

Sun Microsystems Java Coding Conventions http://java.sun.com/docs/codeconv/index.html

Only english words can be used to name classes, field, methods etc. Fields and variables are nouns, where methods are verb phrases:

Bad smells

Avoid bad smells in unit tests presented on the Unit Testing lecture. Files should be placed in separate directories for source and tests. Avoid duplicated code in your tests. testXXX method should contain only one test case. Do not put absolute paths in your tests. All tests should run not only on authors' machine.

One should also avoid the following improper code constructs:

Long Method (more information can be found here)
Data Class (more can be found here)

Technical documentation

Unit tests should be self documenting, so technical documentation is optional.

Task

One should test GeometricSeries class. Reading from file, throwing exceptions, and private methods should also be tested. How to test private methods can be found here.

Evaluation

One should deliver test suite with test cases. Occurrence of at least one bad smell lowers a grade by 1. Occurrence of two smells lowers a grade by 2. Violations of Java Coding Conventions and/or faults in javadoc lower a grade by 0.5. Improper behavior of the program lowers a grade by 0.5. Program that has compilation errors will not be evaluated.