Better HN
topnewbestaskshowjobs
Log inSign up

cowardlydragon

336 karma · joined Jun 5, 2014 (12y ago) · 337 submissions

Submissions

comment 9y ago · link · parent

mocking / interaction / expect breaks encapsulation to perform "testing".

Thus it is often a test of the implementation's assumptions when first written, and even worse, when the code is maintained/edited, the test is merely changed to get it to pass, because unit tests with mocks are usually:

1) fragile to implementation 2) opaque as to intent

Whereas input/output integration points are more reliable, transparent, and less fragile to implementation changes if the interface is maintained.

However, if you must do mock-level interaction testing, Spock has made it almost palatable in Javaland.

This is one area where functional fans get to make the imperative folks eat their lunch.

comment 9y ago · link · parent

Also: the fundamental undecidability of the Halting Problem
12345
12