Re: Detecting test method name during TestFixture Setup
[email protected] Tue, 26 Aug 2008 13:46:25 +0530
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <OFC7C11C3E.DDF4C877-ON852574B1.00275F5D-652574B1.002DA966@mksinst.com> |
Eric, I think this article will help. http://www.simple-talk.com/dotnet/.net-tools/testing-times-ahead-extending-nunit/ The last topic "Event Listeners" might be what you looking for. This might be the easy method. The hard way can be by implementing an attribute as described in the article and Fig 17 will show you the exact code. I tried this method. It worked for me. Regards, Grishma Khandwalla "Eric Mangold" <[email protected]> Sent by: [email protected] 08/26/2008 12:03 PM To nunit-users <[email protected]> cc Subject [Nunit-users] Detecting test method name during TestFixture Setup Is there any way to detect the name of the test method, or get access to it via reflection, from withing the [Setup] method? If there is, I assume the same technique applies equally well to [Teardown]? I have the need to print log messages to standard output showing the start and end of each test. Regards, Eric Mangold ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users