Skip to main content
3 events
when toggle format what by license comment
May 8, 2013 at 13:20 comment added Kazark @AnthonyPegram I know about the one-assert-per-test paradigm. I prefer the "test one thing" mantra (as advocated by Bob Martin, against one-assert-per-test, in Clean Code). Side note: unit testing frameworks that have "expect" versus "assert" are nice (Google Tests). As for the rest, why don't you split your suggestions into a full answer, with examples? I think I could benefit.
May 8, 2013 at 2:24 comment added Anthony Pegram Osherove would have your head on a platter for having 3 asserts. ;) The first one to fail means you never validate the rest. Note also that you didn't really avoid the loop. You just explicitly expanded it out into its executed form. Not a hard criticism, but just a suggestion to get some more practice isolating your test cases to the minimum amount possible, to give yourself more specific feedback when something fails, while continuing to validate other cases that could conceivably still pass (or fail, with their own specific feedbacks).
May 7, 2013 at 19:21 history answered Kazark CC BY-SA 3.0