Take a look at the TestContext object. Test currentTest = TestContext.Current.Test; TestLog.WriteLine(currentTest.Name);
Lots of other interesting stuff on that object. I suggest you read the API docs related to it. Jeff. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Mark Kharitonov Sent: Wednesday, August 12, 2009 6:25 AM To: MbUnit.User Subject: MbUnit How can several unit test methods share the same SetUp code? Hi. Some of our unit test methods need the same setup code, yet there are reasons not to move them to another test type. Today, in our mstest unit tests we care to name these test with certain prefix or suffix and then test the current test name in the TestInitialize method. Is it possible to achieve the same semantics in MbUnit? To put it in other words, is there such a thing as the current test context and if so, is it available to the unit test writer? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
