A
Arne Vajhøj
Dirk said:Lew, I disagree here. It doesn't make any sense to test such simple
things like getters and setter or any CRUD operations on the database,
especially when you use some ORM framework. That's just a waste of
(rare) time.
I agree with Lew.
Even the most trivial stuff should be unit tested.
If it is trivial then writing the unit tests should be trivial.
And even trivial code can contain bugs. I have seen setters/getters
being copy pasted and only the method name but not the field being
accessed being changed.
You should use a test coverage tool instead to decide if
the coverage level satisfies you (and your boss).
Remember that 100% of lines tested does not even guarantee that normal
flows are working (unless all your methods has CCN=1).
Arne