Article ID: 919649 - Last Review: July 31, 2006 - Revision: 2.2 You cannot use inheritance in unit testing in Visual Studio Team System Test Edition and Visual Studio Team System Developer Edition
INTRODUCTIONIn Microsoft Visual Studio 2005 Team System Test Edition and in Microsoft Visual Studio 2005 Team System Developer Edition, inheritance is not supported in unit testing. MORE INFORMATIONIn Microsoft Visual Studio 2005 Team System Test Edition and in Microsoft Visual Studio 2005 Team System Developer Edition, you can use unit tests to test the methods and the properties of a class by directly calling a method and then passing parameters to the method. Additionally, when you create unit tests, the test methods are compiled into a single test class. You can create a test class that uses inheritance, but test methods in base classes are not considered test methods in derived classes. In other words, although you can derive a test class from a base test class, you cannot successfully run test methods in the derived class. Methods that you write within your derived class and that you mark with the TestMethod attribute appear in the test windows. You can run these methods in the Visual Studio IDE and from the command line. For more information, visit the following Microsoft Developer Network (MSDN) Web sites: http://msdn2.microsoft.com/en-us/library/ms182516.aspx
(http://msdn2.microsoft.com/en-us/library/ms182516.aspx)
http://msdn2.microsoft.com/en-us/library/ms173149.aspx (http://msdn2.microsoft.com/en-us/library/ms173149.aspx) | Other Resources Other Support Sites
CommunityArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top