3 ms·
Let's consider your first example: a method with just one line of code. I'm not sure why you bring that up. There's nothing intrinsically wrong about a method
by kyberias 10y ago
Let's consider your first example: a method with just one line of code.
I'm not sure why you bring that up. There's nothing intrinsically wrong about a method that only has one line of code. That one line of code can, for example, contain a complex calculation and the method is an abstraction for that calculation.
Even one line of code just calling another method can be quite alright if the method is, for example, part of an adapter or facade class.
Of course this sentence seems to capture your thinking:
"excessive interface use due to the (clueless)need of pedantic levels of unit testing"
- knocte 10y ago> I'm not sure why you bring that up. Sorry, forgot to give more details: a private method with a single line of code. That is: something which can be simply done in the caller. > Of course this sentence seems to capture your thinking: Yes, unit testing can be excessive too. Of course I'm more against zero unit testing than excessive unit testing, but each test is an investment, and the optimal approach is, as usual, somewhere in the middle.