Why are tests for null in the add methods and not the testAdd methods?
Index Tests for null are logic tests as opposed to business rule tests. Business rule tests depend upon the semantics of the business domain and are isolated in separate test methods to encapsulate them for maintenance and extension. Specializations may extend or override the testAdd methods to implement new business rules. Specializations rarely if never override logic tests so we put that check in the add method. (See also our article Putting Business Rules into Business Objects).
Related Questions
- What types of scales were involved in the various tests and methods of assessment that you considered in selecting the instruments and diagnostic frameworks that you used in the case at hand?
- Why are tests for null in the add methods and not the testAdd methods?
- What other tests or methods qualify a coating for medical end uses?