Preferences

100% means testing things getters and setters in Java. At some point you're testing nothing.

If you tell people that 95% is just as inadequate as 0%, they'll tend towards 0%.


There are two possibilities

1. The getters and setters are not called anywhere in application logic. In that case, delete the getters / setters and get to 100%.

2. The getters and setters are called somewhere in the application logic. In that case, they should have already been covered in the test for the application.

There is really no excuse to not write tests to get to 100%.

> The getters and setters are not called anywhere in application logic

It's common that getters and setters will be called by serialization library. The fact that they are "grey" in IntelliJ doesn't matter.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal