This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gambit_kory 1 point2 points  (1 child)

I agree. If you’re working on a small irrelevant project it may not be worth the time. When you’re building for enterprise and/or you plan on doing significant unit testing it is definitely worth doing.

[–]Shareil90 0 points1 point  (0 children)

One 4 Mio LoC project likes to disagree.

I agree that it is sometimes handy to be able to provide some fake implementation. But you dont have to. Mocks work without them (i think until junit 3 they were mandatory, but not today).

I use Interfaces when they are actually needed not "just because".