<?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: Call for common code &#8211; Can we unit test it</title>
	<atom:link href="http://www.21apps.com/sharepoint/call-for-common-code-can-we-unit-test-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.21apps.com/sharepoint/call-for-common-code-can-we-unit-test-it/</link>
	<description></description>
	<lastBuildDate>Tue, 07 Sep 2010 09:39:07 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peli</title>
		<link>http://www.21apps.com/sharepoint/call-for-common-code-can-we-unit-test-it/comment-page-1/#comment-1204</link>
		<dc:creator>Peli</dc:creator>
		<pubDate>Wed, 26 May 2010 19:37:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/?p=1218#comment-1204</guid>
		<description>Hi Elena, we (the Pex team) can answer your question on our forums at &lt;a href=&quot;http://social.msdn.microsoft.com/Forums/en-US/pex/threads/&quot; rel=&quot;nofollow&quot;&gt;http://social.msdn.microsoft.com/Forums/en-US/p...&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Hi Elena, we (the Pex team) can answer your question on our forums at <a href="http://social.msdn.microsoft.com/Forums/en-US/pex/threads/" rel="nofollow"></a><a href="http://social.msdn.microsoft.com/Forums/en-US/p.." rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/p..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elena</title>
		<link>http://www.21apps.com/sharepoint/call-for-common-code-can-we-unit-test-it/comment-page-1/#comment-1203</link>
		<dc:creator>Elena</dc:creator>
		<pubDate>Mon, 24 May 2010 19:24:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.21apps.com/?p=1218#comment-1203</guid>
		<description>Hi Andrew,&lt;br&gt;&lt;br&gt;I am having problems with the SPWebTemplateCollection Mole, the code below throws a &quot;Invalid initializer member declarator&quot;. I&#039;ve only just started using the framework so appologies if it&#039;s something obvious. However it may be due to a missing mole somewhere under the hood.&lt;br&gt;Thanks&lt;br&gt;Elena&lt;br&gt;&lt;br&gt;//Arrange and Assert&lt;br&gt;            MSPSite.BehaveAsNotImplemented();&lt;br&gt;            MSPContext.BehaveAsNotImplemented();&lt;br&gt;            MSPWebTemplateCollection.BehaveAsNotImplemented();&lt;br&gt;&lt;br&gt;            MSPContext.CurrentGet = () =&gt; new MSPContext&lt;br&gt;            {&lt;br&gt;                SiteGet = () =&gt; new MSPSite&lt;br&gt;                {&lt;br&gt;                    RootWebGet = () =&gt; new MSPWeb&lt;br&gt;                    {&lt;br&gt;                        SiteGet = () =&gt; new MSPSite&lt;br&gt;                        {&lt;br&gt;                            AllWebsGet = () =&gt; new MSPWebCollection&lt;br&gt;                            {&lt;br&gt;                                // When the web create is called, check all the arguments of the call are correct.&lt;br&gt;                                AddStringStringStringUInt32StringBooleanBoolean = (siteurl, sitetitle, sitedescription, language, sitetemplate, uniquePermissions, convertIfThere) =&gt;&lt;br&gt;                                    {&lt;br&gt;                                        PexAssert.AreEqual&lt;string&gt;(siteurl, &quot;TestSite&quot;);&lt;br&gt;                                        PexAssert.AreEqual&lt;string&gt;(sitetitle, &quot;Test Site Title&quot;);&lt;br&gt;                                        PexAssert.AreEqual&lt;string&gt;(sitedescription, &quot;Test Site Description&quot;);&lt;br&gt;                                        PexAssert.AreEqual&lt;UInt32&gt;(language, Convert.ToUInt32(1033));&lt;br&gt;                                        PexAssert.AreEqual&lt;string&gt;(sitetemplate, &quot;BLANKINTERNET&quot;);&lt;br&gt;                                        PexAssert.AreEqual&lt;bool&gt;(uniquePermissions, true);&lt;br&gt;                                        PexAssert.AreEqual&lt;bool&gt;(convertIfThere, false);&lt;br&gt;                                    }&lt;br&gt;                            }&lt;br&gt;                        }&lt;br&gt;                    },&lt;br&gt;                    GetWebTemplatesUInt32 = (Convert.ToUInt32(1033)) =&gt; new MSPWebTemplateCollection&lt;br&gt;                    {&lt;br&gt;                        GetWebTemplateByIdConfigurationInt32Int32 = (&quot;BLANKINTERNET&quot;) =&gt; new MSPWebTemplate&lt;br&gt;                        {      &lt;br&gt;                        }&lt;br&gt;                    }&lt;br&gt;                }&lt;br&gt;            };</description>
		<content:encoded><![CDATA[<p>Hi Andrew,</p>
<p>I am having problems with the SPWebTemplateCollection Mole, the code below throws a &#8220;Invalid initializer member declarator&#8221;. I&#39;ve only just started using the framework so appologies if it&#39;s something obvious. However it may be due to a missing mole somewhere under the hood.<br />Thanks<br />Elena</p>
<p>//Arrange and Assert<br />            MSPSite.BehaveAsNotImplemented();<br />            MSPContext.BehaveAsNotImplemented();<br />            MSPWebTemplateCollection.BehaveAsNotImplemented();</p>
<p>            MSPContext.CurrentGet = () =&gt; new MSPContext<br />            {<br />                SiteGet = () =&gt; new MSPSite<br />                {<br />                    RootWebGet = () =&gt; new MSPWeb<br />                    {<br />                        SiteGet = () =&gt; new MSPSite<br />                        {<br />                            AllWebsGet = () =&gt; new MSPWebCollection<br />                            {<br />                                // When the web create is called, check all the arguments of the call are correct.<br />                                AddStringStringStringUInt32StringBooleanBoolean = (siteurl, sitetitle, sitedescription, language, sitetemplate, uniquePermissions, convertIfThere) =&gt;<br />                                    {<br />                                        PexAssert.AreEqual&lt;string&gt;(siteurl, &#8220;TestSite&#8221;);<br />                                        PexAssert.AreEqual&lt;string&gt;(sitetitle, &#8220;Test Site Title&#8221;);<br />                                        PexAssert.AreEqual&lt;string&gt;(sitedescription, &#8220;Test Site Description&#8221;);<br />                                        PexAssert.AreEqual&lt;UInt32&gt;(language, Convert.ToUInt32(1033));<br />                                        PexAssert.AreEqual&lt;string&gt;(sitetemplate, &#8220;BLANKINTERNET&#8221;);<br />                                        PexAssert.AreEqual&lt;bool&gt;(uniquePermissions, true);<br />                                        PexAssert.AreEqual&lt;bool&gt;(convertIfThere, false);<br />                                    }<br />                            }<br />                        }<br />                    },<br />                    GetWebTemplatesUInt32 = (Convert.ToUInt32(1033)) =&gt; new MSPWebTemplateCollection<br />                    {<br />                        GetWebTemplateByIdConfigurationInt32Int32 = (&#8221;BLANKINTERNET&#8221;) =&gt; new MSPWebTemplate<br />                        {      <br />                        }<br />                    }<br />                }<br />            };</p>
]]></content:encoded>
	</item>
</channel>
</rss>
