1 Oct 2009 13:10
Re: RFC: How to structure xUnit test fixtures that share a chunk of setup + handle mocks that raise events
Gishu Pillai <gishu.pillai <at> gmail.com>
2009-10-01 11:10:20 GMT
2009-10-01 11:10:20 GMT
On Mon, Sep 28, 2009 at 5:32 AM, David Tchepak <tchepak <at> gmail.com> wrote: > > If you are using Rhino Mocks 3.5+ I recommend using the Arrange - Act - > Assert syntax to give you a dynamic mock without worrying about the > record/replay/verify stuff: > Thanks David. The specific issue I was seeing was due to the Record-Replay model of Rhino Mocks. An event subscription in the test subject's ctor (in Setup()) was recorded as an expectation - since ReplayAll is only called half-way thru the test. Moving to the new v3.5 AAA style resulted in a much more intuitive test. I guess my bigger question was - how do we share a major chunk of setup code between 2 test fixtures? Since the setups differ, they should ideally be different xUnit TestFixtures. However duplicating the same fixture member variables and expectations seemed a bit off to me... Was evaluating if someone had worked out a scheme based on inheritance. I got another suggestion off the list of having private helper methods that setup state. So each test begins with a call to one of these setup-helper methods. -- Gishu [Non-text portions of this message have been removed] ------------------------------------(Continue reading)
1) I think you have too much material for the time if
your objective is to teach TDD. I do Gui testing on
the third day of my TDD class.
2) If your goal is to inspire/motivate/convince rather
than teach, then you may not need all the material. Ask
yourself what factors would lead this particular audience
to decide in favor of trying TDD and *only* include that
material.
3) If some material is included because you anticipate
objections, wait till people raise them - of course you
have to allow time for that. You can still prepare the
material that answers common objections but don't bring
it out until they are raised.
4) Split up your material into more slides. For example,
slide 7 "covers" seven principles of design in one slide.
Put them on separate slides and consider adding good and
bad examples to illustrate.
5) On the google site, your text doesn't it well on the
page - make sure it looks OK in your original presentation.
6) I like the slides that have graphical elements. Try
Perhaps something like
RSS Feed