On 3 Jul 2007, at 08:57, Ovid wrote:

----- Original Message ----
From: Adrian Howard <[EMAIL PROTECTED]>

As you can see, I called SUPER::startup instead of SUPER::setup.
[snip]

Not that it helps solve your problem - but I tend to use multiple
setup routines rather than inheritance to add extra set up code to a
class. I generally find it reads more cleanly since I can give my
methods more intention revealing names.

The issue I have with that is that the setup routines run in alphabetical order and I was surprised to discover that another programmer wrote this as a result:

  sub zzzteardown : Tests(teardown) { ... }
[snip]

Yeah. Anti-pattern. The global alpha-sorting was, in hindsight, a mistake on my part. I'll probably have a switch for JUnit 4 style ordering which is saner at some point.

For me it's never really been a problem since I usually find that multiple setup/startup and teardown/shutdown methods aren't order dependent. Probably and artefact of the code I've been testing.

Adrian

Reply via email to