3 ms·
Zalew, that's a great point but in the force.com environment you must have 75% coverage and as /wrote, I err on the side of caution in my code which can cost me
by laceysnr 14y ago
Zalew, that's a great point but in the force.com environment you must have 75% coverage and as /wrote, I err on the side of caution in my code which can cost me in terms of %. I don't like to change my code for the sake of tests, but layout is another matter.
- NateDad 14y agoYou're using layout to cover up the fact that you're not testing the most important line in that function. Error handling should be the FIRST thing you test.
- laceysnr 14y agoI test most, but like l said I tend to be over cautious such that some exceptions are not mine to throw, as in only major platform issues will generate them, and I refuse to add logic to the main code to facilitate tests. On some platforms I would be in complete agreement with you but Force.com has it's own specific peculiarities.