You pretty much have the right idea.  It would indeed be a pain to set
up.  Sorry...

I'll add your suggestion to the list for Gallio.  Gallio decorators can
actually have non-local effects upon the test tree so the behavior you
want is already possible there.  But it wouldn't hurt to optimize the
case to make it easier.

Jeff. 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Seth A. Roby
Sent: Wednesday, August 29, 2007 2:08 PM
To: MbUnit.User
Subject: MbUnit Re: DecoratorPatternAttribute


On Aug 29, 1:02 pm, "Jeff Brown" <[EMAIL PROTECTED]> wrote:
> Is there a common usage pattern we could extract here into a 
> general-purpose feature so you wouldn't need to write lots of 
> decorators?  Perhaps a factory that could handle decommission concerns

> (such as disposal) for the objects it produces?

Having looked into TestFixtureExtensionAttribute, I *think* I'd have
to:
 1. Create the attribute itself
 2. Have the attribute create an IRun (another class)  3. Have the IRun
implement Reflect to (here I run into speculation) decorate the
RunInvokerTree (or maybe the RunInvokerVertex?) with a new IRunInvoker
(yet another class)  4. Have my IRunInvoker subclass do the actual set
up for the test (and maybe the teardown, or maybe that's a separate
IRunInvoker?)

At that point, I decided that it was more trouble than it was worth and
wrote it into my tests' SetUp and TearDown.

So yes, I think there's definitely an opening for a
EntireTestDecoratorPatternAttribute somewhere, that acts just like the
(comparatively simple) TestDecoratorPatternAttribute. What would be best
would be if you could just tell the TestDecoratorPatternAttribute if it
should wrap the whole process collectively or each part individually.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to