| Test for the Account domain object in the JPetStore sample application.
This test reveals a SpringUnit anti-pattern:
if testing of a method does not require variation of the data,
then moving the test data into a separate XML file
introduces unnecessary overhead.
For the Account class, only two methods fall into this
category: getListOptionAsInt and getBannerOptionAsInt.
If tested at all, only these two methods require testing.
There exists a strong argument for not testing the class
at all, since there is nothing that could possibly break
(that could not be identified easily by code inspection).
author: Ted Velkoff |