Hrrm.
Let's see.

1. So, I can see in RunPipeStarter that all exceptions are caught when
executing RunInvokers.  There is no relation to arguments at all as far
as I can tell.

I'm not also clear where the assertion is thrown since your sample below
does not show one.  Is it inside the test method?  Does your test method
actually have arguments?  Changing whether arguments are added will
effect whether the test method can actually be invoked.

I think it would help me to see more code so I can get a more complete
idea of what's going on.

2. Would you be interested in porting this work to Gallio?  I think
you'll find it much more extensible and expressive.  It also runs MbUnit
v2, NUnit and xUnit.Net tests via an adapter.  I'm currently working to
get the Alpha 2 release out the door.

Once that's done we can look into adding fully supported CppUnit,
CSUnit, MSTest adapters among others.  They would probably only take 1
day each depending on the level of integration desired.

Jeff.

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Aaron Rehaag
Sent: Sunday, February 03, 2008 12:07 AM
To: MbUnit.User
Subject: MbUnit Assertions going unhandled by MbUnit when using
parameterized run invokers


Hey everyone,

I'm trying to build a custom extension to MbUnit to execute CppUnit
tests and mirror the results into MbUnit test hierarchy.  In order to do
so, I've created a custom run invoker to execute tests using a cppunit
runner.

Now the interesting part... when I add an Assert.Fail() statement into
my run invoker' Execute() method, the AssertionException thrown is never
caught / handled by MbUnit.  As I suspected my code might be flawed, I
tried downloading Jay Flower's XHtml extension sample solution
(http://jayflowers.com/WordPress/?p=88) and found the same behavior
running the 2.4 release.  In a weird twist, it seems that if you comment
out the following line:

    public override object Execute(object o, IList args)
    {
        foreach (Object Arg in this.Args)
        {
            // args.Add(Arg);  /* Including an argument somehow makes
MbUnit not handle the assertion exception. */
        }

        return base.Execute(o, args);
    }

The assertion is caught by MbUnit.

Does anyone have any insight into why MbUnit is exhibiting this
behavior?  Am I missing some crucial logic for handling these cases
correctly?

Any help that can be provided would be much appreciated.

Cheers,
-A


--~--~---------~--~----~------------~-------~--~----~
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