2 ms·
I find the biggest barrier to unit tests is not noticing when it's more appropriate to create a public static function (probably on another class) instead of a
by jdmichal 13y ago
I find the biggest barrier to unit tests is not noticing when it's more appropriate to create a public static function (probably on another class) instead of a private one. If a private method is so complex that you cannot appropriately test it using the public interface, then it really needs to be its own entity.