tag:blogger.com,1999:blog-7290642316743338665.post8141864610118926770..comments2023-09-20T05:23:44.886-05:00Comments on behind the times: Groovy+Testing: Little Things, Big ImpactHamlet D'Arcyhttp://www.blogger.com/profile/04008870357169725586noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-7290642316743338665.post-51611149234995967552009-07-25T20:01:18.550-05:002009-07-25T20:01:18.550-05:00Not only do chained methods add more to the tests,...Not only do chained methods add more to the tests, they add more to the call stack when debugging. And the only way to truly be sure what the chained methods do is to inspect their implementation. Frankly, rather than adding a bunch of "convenience methods", I tend to force the caller to explicitly specify the values.<br /><br />Default values are reasonably self-documenting and they live where they ought to, in the method specification.Walter Harleyhttps://www.blogger.com/profile/08881685720667072795noreply@blogger.comtag:blogger.com,1999:blog-7290642316743338665.post-77158458116465548682009-07-24T08:07:13.795-05:002009-07-24T08:07:13.795-05:00@Dave agreed, I use String.format all the time. Bu...@Dave agreed, I use String.format all the time. But it always results in me futzing with spacing a line breaks to try and make it look readable.Hamlet D'Arcyhttps://www.blogger.com/profile/04008870357169725586noreply@blogger.comtag:blogger.com,1999:blog-7290642316743338665.post-35159166743743351102009-07-24T06:49:40.113-05:002009-07-24T06:49:40.113-05:00It's only marginally better, but using String....It's only marginally better, but using String.format avoids ugly String concatenation.Dave Newtonhttps://www.blogger.com/profile/13420113088393527059noreply@blogger.com