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

Re: [XP] Testing Leftover

Expand Messages
  • Ian Collins
    ... OK, a recent example: A class to manage a log split over a group of small files. Test one: make sure the directory containing the logs is created. Test
    Message 1 of 42 , Jun 1, 2004
    • 0 Attachment
      Ron Jeffries wrote:

      >On Tuesday, June 1, 2004, at 2:37:36 AM, Ian Collins wrote:
      >
      >
      >
      >>What about the evolution of the class? Say a class performs a number of
      >>actions when it is constructed and these are implemented through
      >>non-trivial private methods. So you write a test for the first method,
      >>then the next until the startup actions are complete and tested. You
      >>could just call the constructor, but then you have to dig deeper when
      >>one of the private methods breaks.
      >>
      >>
      >
      >This story sounds to me like something going wrong in the design. But I'd
      >have to see a real example to be sure. A complicated constructor troubles
      >me, for sure ...
      >
      >
      >
      OK, a recent example:

      A class to manage a log split over a group of small files.

      Test one: make sure the directory containing the logs is created.
      Test two: test calculation of entries per file and number of files.
      Test three: locate files (if any) with first and last entries.

      These where the first three tests written. These are also the first
      three things the object does when it is created.

      Ian
    • 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
      • 0 Attachment
        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.