Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version

How to Test Private and Protected methods in .NET

, 1 Mar 2005
This article explains some theory behind testing/not testing private methods, and then provides and walks through a downloadable code sample to demonstrate these testing techniques.
unittestdemo.zip
UnitTestDemo
ClassLibrary1
bin
Release
ClassLibrary1.dll
UnitTests
App.ico
bin
Release
ClassLibrary1.dll
UnitTests.exe
UnitTestUtilities.dll
nunit.framework.dll
UnitTestUtilities
bin
Release
UnitTestUtilities.dll
using System;

namespace UnitTests
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	class Class1
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
			//
			// TODO: Add code to start application here
			//
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

TimStall
Web Developer
United States United States
Tim Stall is a Chicago-based technical consultant for Computer Sciences Corporation (www.csc.com), a leading global IT services company. In addition to his expertise in Microsoft.Net development projects and enterprise architecture, Tim's .Net experience includes, writing technical publications, leading internal training, and having MCAD certification. His blog is at http://timstall.dotnetdevelopersjournal.com/.

| Advertise | Privacy | Mobile
Web02 | 2.8.141022.1 | Last Updated 1 Mar 2005
Article Copyright 2005 by TimStall
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid