eyandai/ivy-address-book — Issue #5: everything related with unit test
Author: honnix
Created: 2012-03-06 10:24:04+00:00
State: open
Labels: bug, enhancement

* consider class method/field visibility

* to verify an exception is thrown, we use @Test(expected = Xxx.class)

* one test case, test one thing, i.e. `validatePhoneNumber`, this should be split into two cases

* add message to assertions

* something like `new String("1")` is absolutely not acceptable

* remove empty methods if not used

* programming towards interface `AddressBookServiceImpl addressBookServiceImpl;`

* you should not use `file = new File("/phonebook.xml")` to load a file, test related resources should be inside src/test/resources, use `class.getResourceAsStream`

* do not coding a very long string, at least use "+" to concat