Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are tests for null in the add methods and not the testAdd methods?

methods null testAdd tests
0
10 Posted

Why are tests for null in the add methods and not the testAdd methods?

0

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 is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123