The aim of this task is to practise unit tests creation with JUnit.
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:
private boolean readonly = false;
public void setReadOnly() { readOnly = true; }
public void setReadWrite() { readOnly = false; }
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:
Unit tests should be self documenting, so technical documentation is optional.
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.
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.