¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

[TDD] a not on assert-first


Kent Beck
 

I like assert-first, too, but it's not a habit yet. Jim- how consistently do
you use it?

Kent


twelve71
 

--- In testdrivendevelopment@y..., "Kent Beck" <kentbeck@c...> wrote:
I like assert-first, too, but it's not a habit yet. Jim- how
consistently do
you use it?
I confess to not having read the manuscript yet, but are you atlking
about making the first thing you write in the test method the
assertion ?

If so, since you /repeatedly/ made the point at me during the
September immersion, I've found that I started to do it all the
time. I'm loving it. It's been almost as big a revelation as TfD
was at the first immersion.

A.


 

Alan:
I've found that I started to do it all the
time. I'm loving it. It's been almost as big a revelation as TfD
was at the first immersion.
Ditto, not only do I find myself doing the assert first whenever I can't
think of what to write (which is most of the time), but I have found it to
be the fastest way to getting an "aha" moment when teaching others to use
TfD.

Best,
Bill


james_newkirk
 

--- In testdrivendevelopment@y..., "Kent Beck" <kentbeck@c...> wrote:
I like assert-first, too, but it's not a habit yet. Jim- how
consistently do
you use it?
How often do I do this? I do this when I am writing the first few
tests for a new class. Once I have written a few tests and methods
I do it less often.

Jim


Steve Freeman
 

--- In testdrivendevelopment@y..., "Kent Beck" <kentbeck@c...> wrote:
I like assert-first, too, but it's not a habit yet. Jim- how
consistently do
you use it?
we have a similar experience when using mock objects. The first question
you ask is which object to verify (i.e. who would know that you've done
the right thing). Once you've sorted that out, the rest usually follows.

Steve