InterviewSolution
Saved Bookmarks
| 1. |
For Which Conditions, The Methods Get () And Set () Can Be Left Out For Testing? |
|
Answer» You should do this TEST to check if a property has already been set (in the constructor) at the point you wish to call GETX(). In this case you must test the constructor, and not the getX() METHOD. This kind of test is especially useful if you have MULTIPLE constructors. You should do this test to check if a property has already been set (in the constructor) at the point you wish to call getX(). In this case you must test the constructor, and not the getX() method. This kind of test is especially useful if you have multiple constructors. |
|