Managed World

Techno-babble from yet another babbler RSS 2.0
# Saturday, April 29, 2006
This kind of bit me in the bud for a while here at home, so I thought I would throw this out in case any others are having the same problem. The symptom was even though I had a setup method decorded with the "SetUp" NUnit attribute, the method wasn't being executed by TestDriven.NET.

Luckily, I don't believe this is an issue with TestDriven.NET as it as an unfortunate side effect with the new C# class templates in VS2005. By default, when you create a new class in VS2005 (at least for me), the class is simply declared as "class MyClass" rather than "public class MyClass". That is what is causing the failure. Once you change the scope of the class to be public, TestDriven.NET will now start running the Setup method as expected.

When you think about it the behavior makes sense. But it is frustrating nonetheless :).
Posted in Programming
 #       Comments [2]

Contact

Email Me Send mail to the author(s)

Calendar

<April 2006>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

About this site

Jason Olson's thoughts on Programming, Games, Music and Life in General

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Jason Olson

Sign In
All Content © 2008, Jason Olson
Theme based on 'Business' created by Christoph De Baene (delarou)