This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I have a javabean class. I should add Junittest class for that. I am wondering how to add test cases for getter setter methods. Evenif I add, will that be a proper testing of Java? Or are we just testing the java compiler by doing this?
Patt, In general, testing getters and setters directly doesn't add much value. However, a good suite of tests will cover those methods indirectly by testing the classes that call those getters and setters.