Loading ...
Sorry, an error occurred while loading the content.
 

[XP] Re: Testing Leftover

Expand Messages
  • Dave Astels
    ... I would hesitate to add a getter solely for a test. I d prefer to add a query method to check for side-effects. And by pollution of code for testing.. I m
    Message 1 of 42 , Jun 1, 2004
      --- In extremeprogramming@yahoogroups.com, Ron Jeffries
      <jeffries@d...> wrote:

      > >> Yes. But if the tests need the getter what then?
      >
      > > Is the getter corresponding to a setter that much worse than an
      > > 'unnecessary' equals() or toString()?
      >
      > No. If the above was me, I'm pointing out that a getter isn't a
      > reference to the test classes, but it might be there only because of
      > the tests.

      I would hesitate to add a getter solely for a test. I'd prefer to add
      a query method to check for side-effects.

      And by pollution of code for testing.. I'm more concerned with adding
      knowledge of testing to the prod code (i.e. adding a "testing mode")
      rather than adding methods that provide "support" for testing.

      Dave
    • Phlip
      ... The author of /Working Effectively with Legacy Code/ has reminded us that _in_ sight is better. More team awareness of the difference between the real and
      Message 42 of 42 , Jun 1, 2004
        Ian Collins wrote:

        > I prefer it shorter, uglier and out of sight!

        The author of /Working Effectively with Legacy Code/
        has reminded us that _in_ sight is better. More team
        awareness of the difference between the real and the
        ideal.


        =====
        Phlip
        http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces




        __________________________________
        Do you Yahoo!?
        Friends. Fun. Try the all-new Yahoo! Messenger.
        http://messenger.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.