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

Re: [XP] Behaviour Driven Development

Expand Messages
  • BenAveling
    ... Hi Ravi, If I understand what Elizabeth is saying, which maybe I don t, the important difference is not between a well chosen testXXX and shouldXXX. The
    Message 1 of 106 , Oct 2, 2005
      Ravi Mohan wrote:
      > is there such a big difference between 'shouldBeEmptyWhenFirstCreated' and 'testIsEmptyWhenFirstCreated'

      Hi Ravi,

      If I understand what Elizabeth is saying, which maybe I don't, the
      important difference is not between a well chosen testXXX and shouldXXX.

      The important difference is that a badly chosen testXXX doesn't stand
      out as well as a badly chosen shouldXXX.

      For example, I have quite happily used things like 'testInitialState'.

      That sounds OK, but 'shouldInitialState' doesn't, which suggests I need
      to say more. Perhaps 'shouldBeEmptyWhenFirstCreated'.

      The problem with 'testInitialState' is that it tends to end up doing
      more than one thing.

      For example, I recently coded a solution to the Bowling Kata and this is
      one of the methods I created.

      public void testIntialStateOfGame() {
      assertFalse(game.isOver());
      assertFalse(game.currentFrame().isOver());
      assertEquals(0, game.getScore());
      }

      It works, but am I really testing 3 aspects of one thing, or am I
      actually testing 3 different things?

      And more importantly, which of those two things is more useful to do?

      Regards, Ben A.
    • Jeff Grigg
      ... It s those inductive loops they put in the rectangular cuts just before (and often crossing) the stop lines. I figure they must use those to read your
      Message 106 of 106 , Oct 14, 2005
        --- Ron Jeffries <ronjeffries@X...> wrote:
        > I was thinking "smart light". We have that story in our
        > list here in Michigan. The green arrow only goes on if
        > there are people wanting to turn. (I don't know how the
        > light knows what people want but I guess it's just
        > really intuitive. ;->)

        It's those inductive loops they put in the rectangular cuts just
        before (and often crossing) the stop lines. I figure they must use
        those to read your mind -- with some kind of magnetic field. ;->


        http://www.stjohns.ca/cityservices/traffic/howsignalswork.jsp

        http://auto.howstuffworks.com/question234.htm

        http://www.tfhrc.gov/pubrds/septoct98/loop.htm
      Your message has been successfully submitted and would be delivered to recipients shortly.