Your tests run in both MbUnit and VSTS?  Interesting...  I guess you're
using paired MbUnit and VSTS attributes within the same codebase and
then just picking whichever assertion framework you prefer to use for a
given test.

One hacky way to do this would be to walk the stack and look for a
caller like MbUnit's RemoteTestEngine.  Another trick would be to look
at the name of the current AppDomain.  Try it out and see what
AppDomain.Current.FriendlyName returns in each case.  I'm afraid I can't
think of a more direct solution at this time...

Jeff. 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of brian macdonald
Sent: Thursday, July 12, 2007 5:18 PM
To: MbUnit.User
Subject: MbUnit Is there a simple boolean query I can access to tell me
if MbUnit is currently running?


I'm running into a problem where we need to diverge code paths *at run
time* between running our unit test assembly via the MbUnit GUI vs.
the MbUnit Console vs. Visual Studio's TestTools framework.

Essentially I need a "IsMbUnitRunning()" or "IsVSTestToolsRunning()"
method that returns a boolean.

Here's one of many reasons: we need to display Warning results in both
VS Test Tools and the MbUnit GUI -- "Assert.Ignore" to abort in MbUnit,
and "Assert.Inconclusive" to abort in VS Test Tools... Both are
makeshifts for reporting a middle-ground result other Success or
Failure.

We can't just call both MbUnit and VS Test Tool asserts sequentially
because one will abort the other in a given test.

I appreciate any help in advance.

Brian




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