DEV Community

Discussion on: Why test POJOs?

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

Testing is about time optimization: you'll never have enough time to test everything, thus you spend your time on the highest value tests.

POJOs will never make it high enough in the priority list to bother testing directly. Because they are always part of some other use-case, the test for those use-cases transitively include the tests for the POJOs. In most projects, adding extra tests for POJOs provide no extra coverage, nor increase in quality -- errors in them will show up in the other tests.

Collapse
 
scottshipp profile image
scottshipp

Never say never 🙂