DEV Community

Discussion on: Why test POJOs?

Collapse
 
mt3o profile image
mt3o

Focus. It's not about that it's referenced by marshalling, or reflection in general, but about not being a part of direct code base. They are generated by the compiler.

There are reasons for providing 70%-80% on code coverage, and agreement on not testing POJO is one of them.

I think that in general you have to rethink WHY people write tests, or even TDD, and why they they don't.
Also, what are the drawbacks of having 100% coverage.
Please note that coverage doesn't guarantee that your code will be bug free, and instead of focusing on scoring coolness points, focus on bugs coming from misuse of programs logic, faulty incoming data and concurrency.