<?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: TDD and SharePoint is it worth doing?</title>
	<atom:link href="http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/</link>
	<description></description>
	<lastBuildDate>Fri, 12 Mar 2010 07:58:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: AndrewWoody</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-947</link>
		<dc:creator>AndrewWoody</dc:creator>
		<pubDate>Sun, 05 Jul 2009 16:46:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-947</guid>
		<description>Joe,  probably two parts to the answer, and excuse me I&#039;m teaching you to suck eggs.&lt;br&gt;&lt;br&gt;First: Your not going to be writing unit tests for the SPSite.Exists method as you really have to make the call that Microsoft already did this.   &lt;br&gt;&lt;br&gt;Second:  You actually want to write some code, a method, that will in it&#039;s logic make a call to the SPSite.Exists method to determine the actions for that method.  To make this a unit test you will need to mock out the call, which using TypeMock is actually pretty simple.&lt;br&gt;&lt;br&gt;Isolate.WhenCalled(() =&gt; SPSite.Exists(new Uri(&quot;http://www.21apps.com&quot;))).WillReturn(true);&lt;br&gt;&lt;br&gt;Here I&#039;ve just told Typmock to always return true when the SPSite.Exists is called within my method.  You can extend this with checks on the parameters if you wanted as well.&lt;br&gt;&lt;br&gt;Regarding the SPSecurity.RunWithElevatedPrivileges this does present a challenge,  but doing TDD should help as you really drive it from being testable.  This often leads to you coding and testing the methods outside of the SPSecurity.RunWithElevatedPrivileges,  i.e. less anonymous delegates, and also designing you classes so that any elevated calls are contained in very focused code wrapped in your own classes.   &lt;br&gt;This is probably an area that I should do some more blog posts on.</description>
		<content:encoded><![CDATA[<p>Joe,  probably two parts to the answer, and excuse me I&#39;m teaching you to suck eggs.</p>
<p>First: Your not going to be writing unit tests for the SPSite.Exists method as you really have to make the call that Microsoft already did this.   </p>
<p>Second:  You actually want to write some code, a method, that will in it&#39;s logic make a call to the SPSite.Exists method to determine the actions for that method.  To make this a unit test you will need to mock out the call, which using TypeMock is actually pretty simple.</p>
<p>Isolate.WhenCalled(() =&gt; SPSite.Exists(new Uri(&#8221;http://www.21apps.com&#8221;))).WillReturn(true);</p>
<p>Here I&#39;ve just told Typmock to always return true when the SPSite.Exists is called within my method.  You can extend this with checks on the parameters if you wanted as well.</p>
<p>Regarding the SPSecurity.RunWithElevatedPrivileges this does present a challenge,  but doing TDD should help as you really drive it from being testable.  This often leads to you coding and testing the methods outside of the SPSecurity.RunWithElevatedPrivileges,  i.e. less anonymous delegates, and also designing you classes so that any elevated calls are contained in very focused code wrapped in your own classes.   <br />This is probably an area that I should do some more blog posts on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Chung</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-946</link>
		<dc:creator>Joe Chung</dc:creator>
		<pubDate>Sun, 05 Jul 2009 15:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-946</guid>
		<description>How do you do TDD with API&#039;s like SPSite.Exists, SPSecurity.RunWithElevatedPrivileges, and others that do not lend themselves well to mocking and unit testing?</description>
		<content:encoded><![CDATA[<p>How do you do TDD with API&#39;s like SPSite.Exists, SPSecurity.RunWithElevatedPrivileges, and others that do not lend themselves well to mocking and unit testing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias Zimmergren</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-942</link>
		<dc:creator>Tobias Zimmergren</dc:creator>
		<pubDate>Tue, 30 Jun 2009 19:31:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-942</guid>
		<description>HELL YEAH!&lt;br&gt;Oh sorry about the brute vocabulary.. What I meant to say was: I love TDD with SharePoint, thanks for providing us with awesome insight Andrew.</description>
		<content:encoded><![CDATA[<p>HELL YEAH!<br />Oh sorry about the brute vocabulary.. What I meant to say was: I love TDD with SharePoint, thanks for providing us with awesome insight Andrew.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SharePoint Blog by Jeremy Thake in Perth, Australia</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-941</link>
		<dc:creator>SharePoint Blog by Jeremy Thake in Perth, Australia</dc:creator>
		<pubDate>Tue, 30 Jun 2009 11:18:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-941</guid>
		<description>&lt;strong&gt;SharePoint Development Weekly Roundup (30Jun)...&lt;/strong&gt;

[Cross posted on  SharePointDevWiki.com]  Think this is the  ......</description>
		<content:encoded><![CDATA[<p><strong>SharePoint Development Weekly Roundup (30Jun)&#8230;</strong></p>
<p>[Cross posted on  SharePointDevWiki.com]  Think this is the  &#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Small steps for testing, big steps for SharePoint testing &#124; Agile Sharepoint development by 21apps and Andrew Woodward MVP</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-935</link>
		<dc:creator>Small steps for testing, big steps for SharePoint testing &#124; Agile Sharepoint development by 21apps and Andrew Woodward MVP</dc:creator>
		<pubDate>Thu, 25 Jun 2009 08:57:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-935</guid>
		<description>[...] Woodward Shropshire, United Kingdom Principal Consultant for 21apps. view my profile       &#171; TDD and SharePoint is it worth doing?     Thursday, June 25th, [...]</description>
		<content:encoded><![CDATA[<p>[...] Woodward Shropshire, United Kingdom Principal Consultant for 21apps. view my profile       &laquo; TDD and SharePoint is it worth doing?     Thursday, June 25th, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Microsoft's Cloud Computing Strategy, Windows 7 Upgrade Tools, Is the OS Irrelevant? - SharePoint Daily - Bamboo Nation</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-934</link>
		<dc:creator>Microsoft's Cloud Computing Strategy, Windows 7 Upgrade Tools, Is the OS Irrelevant? - SharePoint Daily - Bamboo Nation</dc:creator>
		<pubDate>Wed, 24 Jun 2009 13:46:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-934</guid>
		<description>[...] TDD and SharePoint is it Worth Doing? (Andrew Woodward MVP)Just read a post by Sahil Malik where he gives his reasons for saying &quot;TDD + SharePoint 2007? Well - screw it! Not worth it IMO.&quot; The reason for his statement is that he sees the actual C# code developed as being a very small % of the total SharePoint project and the effort to do this as not worth the return when you consider the project costs overall. [...]</description>
		<content:encoded><![CDATA[<p>[...] TDD and SharePoint is it Worth Doing? (Andrew Woodward MVP)Just read a post by Sahil Malik where he gives his reasons for saying &quot;TDD + SharePoint 2007? Well &#8211; screw it! Not worth it IMO.&quot; The reason for his statement is that he sees the actual C# code developed as being a very small % of the total SharePoint project and the effort to do this as not worth the return when you consider the project costs overall. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AndrewWoody</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-933</link>
		<dc:creator>AndrewWoody</dc:creator>
		<pubDate>Wed, 24 Jun 2009 03:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-933</guid>
		<description>Aaron,  &lt;br&gt;&lt;br&gt;TDD == an approach to writing your code that starts with the unit test first.&lt;br&gt;&lt;br&gt;What you are talking about is the scope of the unit tests,  in the P&amp;P project they make a call as to which elements of the code base are demeed appropriate for unit testing.&lt;br&gt;&lt;br&gt;The problem you have with unit testing workflow code is that workflow is basically infratructure and in order to unit test your code there is just way too much to mock out/fake in order to make it a Unit test.   This is why most projects adopt automated integration testing to prove the workflow code.  This is an area however that I think could do with further investigations and guidance on how to best test your workflow code.</description>
		<content:encoded><![CDATA[<p>Aaron,  </p>
<p>TDD == an approach to writing your code that starts with the unit test first.</p>
<p>What you are talking about is the scope of the unit tests,  in the P&#038;P project they make a call as to which elements of the code base are demeed appropriate for unit testing.</p>
<p>The problem you have with unit testing workflow code is that workflow is basically infratructure and in order to unit test your code there is just way too much to mock out/fake in order to make it a Unit test.   This is why most projects adopt automated integration testing to prove the workflow code.  This is an area however that I think could do with further investigations and guidance on how to best test your workflow code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Weiker</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-932</link>
		<dc:creator>Aaron Weiker</dc:creator>
		<pubDate>Wed, 24 Jun 2009 02:49:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-932</guid>
		<description>There is TDD similar to how the P&amp;P SharePoint group shows. But where I really have a hard time with TDD and SharePoint is where it relates to workflow. Sure I can make workflow act like a simple controller delegating out to other code, but doesn&#039;t that start taking away all of the value of workflow? Or is that the real value, workflow is supposed to only be a broker? But then how do you test logic in the workflow? After all there is an if command.</description>
		<content:encoded><![CDATA[<p>There is TDD similar to how the P&#038;P SharePoint group shows. But where I really have a hard time with TDD and SharePoint is where it relates to workflow. Sure I can make workflow act like a simple controller delegating out to other code, but doesn&#39;t that start taking away all of the value of workflow? Or is that the real value, workflow is supposed to only be a broker? But then how do you test logic in the workflow? After all there is an if command.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AndrewWoody</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-930</link>
		<dc:creator>AndrewWoody</dc:creator>
		<pubDate>Wed, 24 Jun 2009 01:35:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-930</guid>
		<description>Ryan,  the problem was totally with Sahil&#039;s point about TDD.&lt;br&gt;&lt;br&gt;You agree we can&#039;t forgo testing,  and here we mean unit testing as well as all the other kinds.  The cost of producing the unit tests will be similar whether done with TDD or done afterwards (many argue that with TDD it will be less).&lt;br&gt;&lt;br&gt;Why then would Sahil want to make such a big thing about a specific developer approach to the generation of testable code?   As I stated above I think the problem comes with peoples lack of understanding regards to TDD and also the sometime evangelical preaching that some in the community do for its use.&lt;br&gt;&lt;br&gt;Now the question of how much code do you unit test and if you would be better servered through the use of more Integration tests and automation is a valid. And you will find that in SP projects (like the ones Sahil refers) there is likely to be a different mix of unit/integration tests.  &lt;br&gt;&lt;br&gt;But this is nothing to do with TDD - hence my post.</description>
		<content:encoded><![CDATA[<p>Ryan,  the problem was totally with Sahil&#39;s point about TDD.</p>
<p>You agree we can&#39;t forgo testing,  and here we mean unit testing as well as all the other kinds.  The cost of producing the unit tests will be similar whether done with TDD or done afterwards (many argue that with TDD it will be less).</p>
<p>Why then would Sahil want to make such a big thing about a specific developer approach to the generation of testable code?   As I stated above I think the problem comes with peoples lack of understanding regards to TDD and also the sometime evangelical preaching that some in the community do for its use.</p>
<p>Now the question of how much code do you unit test and if you would be better servered through the use of more Integration tests and automation is a valid. And you will find that in SP projects (like the ones Sahil refers) there is likely to be a different mix of unit/integration tests.  </p>
<p>But this is nothing to do with TDD &#8211; hence my post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Miller</title>
		<link>http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/comment-page-1/#comment-929</link>
		<dc:creator>Ryan Miller</dc:creator>
		<pubDate>Wed, 24 Jun 2009 01:03:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/sharepoint/tdd-and-sharepoint-is-it-worth-doing/#comment-929</guid>
		<description>I don&#039;t think anyone would disagree with the statement that quality development techniques should be used within SharePoint projects.  Certainly no one believes you can forego code reviews or testing.  However I think the point that Sahil was trying to make was that within the context of the typical SharePoint project, the benefits of TDD in particular may not warrant its additional costs.</description>
		<content:encoded><![CDATA[<p>I don&#39;t think anyone would disagree with the statement that quality development techniques should be used within SharePoint projects.  Certainly no one believes you can forego code reviews or testing.  However I think the point that Sahil was trying to make was that within the context of the typical SharePoint project, the benefits of TDD in particular may not warrant its additional costs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
