<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Peli's Farm - Pex, Stubs, Moles, QuickGraph, MbUnit, Reflector Addins - Moles</title>
    <link>http://blog.dotnetwiki.org/</link>
    <description>TouchDevelop, Pex4Fun, Rise4Fun, Pex, Moles, QuickGraph, MbUnit, Reflector Addins</description>
    <language>en-us</language>
    <copyright>Jonathan 'Peli' de Halleux</copyright>
    <lastBuildDate>Fri, 17 Sep 2010 04:05:30 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>jonathan.dehalleux@gmail.com</managingEditor>
    <webMaster>jonathan.dehalleux@gmail.com</webMaster>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=8832622c-d2c2-4580-b215-8f1c7558f4c3</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,8832622c-d2c2-4580-b215-8f1c7558f4c3.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,8832622c-d2c2-4580-b215-8f1c7558f4c3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=8832622c-d2c2-4580-b215-8f1c7558f4c3</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We just released <a href="http://research.microsoft.com/pex/releasenotes.aspx">Pex
and Moles v0.94</a> which brings <strong>MSBuild support for Moles!</strong> 
</p>
        <p>
Moles is now entirely based on MSBuild and <strong>does not require to check in any
generated files</strong>. All the previous headaches related to locked files in TFS
are now a history. Moles assemblies will be generated on demand during the build.
We strongly recommend you read the upgrade instructions in the release to see how
you can smoothly upgrade to v0.94.
</p>
        <p>
And while the installer is running, don’t forget to solve a duel or two at <a href="http://www.pexforfun.com">http://www.pexforfun.com</a> …
</p>
        <p>
Cheers, the Pex Team.
</p>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=8832622c-d2c2-4580-b215-8f1c7558f4c3" />
      </body>
      <title>Pex and Moles v0.94: MSBuild support for Moles</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,8832622c-d2c2-4580-b215-8f1c7558f4c3.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/09/17/PexAndMolesV094MSBuildSupportForMoles.aspx</link>
      <pubDate>Fri, 17 Sep 2010 04:05:30 GMT</pubDate>
      <description>&lt;p&gt;
We just released &lt;a href="http://research.microsoft.com/pex/releasenotes.aspx"&gt;Pex
and Moles v0.94&lt;/a&gt; which brings &lt;strong&gt;MSBuild support for Moles!&lt;/strong&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Moles is now entirely based on MSBuild and &lt;strong&gt;does not require to check in any
generated files&lt;/strong&gt;. All the previous headaches related to locked files in TFS
are now a history. Moles assemblies will be generated on demand during the build.
We strongly recommend you read the upgrade instructions in the release to see how
you can smoothly upgrade to v0.94.
&lt;/p&gt;
&lt;p&gt;
And while the installer is running, don’t forget to solve a duel or two at &lt;a href="http://www.pexforfun.com"&gt;http://www.pexforfun.com&lt;/a&gt; …
&lt;/p&gt;
&lt;p&gt;
Cheers, the Pex Team.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=8832622c-d2c2-4580-b215-8f1c7558f4c3" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,8832622c-d2c2-4580-b215-8f1c7558f4c3.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=03301296-7476-4b15-bd61-6ea831730d47</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,03301296-7476-4b15-bd61-6ea831730d47.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,03301296-7476-4b15-bd61-6ea831730d47.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=03301296-7476-4b15-bd61-6ea831730d47</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We’ve just <a href="http://research.microsoft.com/pex/downloads.aspx" target="_blank">released</a> a
new version of <a href="http://research.microsoft.com/pex/">Pex</a> and <a href="http://research.microsoft.com/moles" target="_blank">Moles</a> v0.92.
This version brings <a href="http://research.microsoft.com/rex" target="_blank">Rex</a> integration
(smarter about regular expressions), <strong>Silverlight support</strong> (Alpha)
and a number of bugs/improvements here and there.
</p>
        <p>
Read all about the new stuff on the <a href="http://research.microsoft.com/en-us/projects/pex/releasenotes.aspx#0_92" target="_blank">release
notes page</a>. Happy Pexing!
</p>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=03301296-7476-4b15-bd61-6ea831730d47" />
      </body>
      <title>New Pex release 0.92: Rex and Silverlight</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,03301296-7476-4b15-bd61-6ea831730d47.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/06/07/NewPexRelease092RexAndSilverlight.aspx</link>
      <pubDate>Mon, 07 Jun 2010 19:13:52 GMT</pubDate>
      <description>&lt;p&gt;
We’ve just &lt;a href="http://research.microsoft.com/pex/downloads.aspx" target="_blank"&gt;released&lt;/a&gt; a
new version of &lt;a href="http://research.microsoft.com/pex/"&gt;Pex&lt;/a&gt; and &lt;a href="http://research.microsoft.com/moles" target="_blank"&gt;Moles&lt;/a&gt; v0.92.
This version brings &lt;a href="http://research.microsoft.com/rex" target="_blank"&gt;Rex&lt;/a&gt; integration
(smarter about regular expressions), &lt;strong&gt;Silverlight support&lt;/strong&gt; (Alpha)
and a number of bugs/improvements here and there.
&lt;/p&gt;
&lt;p&gt;
Read all about the new stuff on the &lt;a href="http://research.microsoft.com/en-us/projects/pex/releasenotes.aspx#0_92" target="_blank"&gt;release
notes page&lt;/a&gt;. Happy Pexing!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=03301296-7476-4b15-bd61-6ea831730d47" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,03301296-7476-4b15-bd61-6ea831730d47.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=0fa6daff-ccb4-4f75-a101-5d476167bb19</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,0fa6daff-ccb4-4f75-a101-5d476167bb19.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,0fa6daff-ccb4-4f75-a101-5d476167bb19.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=0fa6daff-ccb4-4f75-a101-5d476167bb19</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
This post shows how you can leverage the un-typed Detours API to extend any mock framework
to support static methods, sealed types, etc…
</p>
        <p>
          <a href="http://research.microsoft.com/moles" target="_blank">Moles</a> is an isolation
framework for .NET that the <a href="http://research.microsoft.com/pex/">Pex</a> team
designed to make Pex happy. It relies heavily on delegates and comes with a syntax
of its own. Moles is actually a simple strongly typed layer on top of a un-typed general
purpose detour API. If you do not like the Moles syntax, you can still leverage the
detours API to deal with static methods or sealed types.
</p>
        <p>
Let us see how we can use the detour API to build a micro-mock-framework using expressions
trees. Let’s call it <strong>Deq</strong>.
</p>
        <p>
          <strong>The Challenge</strong>
        </p>
        <p>
As usual, we’ll toy with an example where we need a very particular DateTime.Now value.
Since DateTime.Now is a struct living in mscorlib.dll, it cannot be mocked using traditional
approaches –DateTime.Now can’t be overloaded. The test case looks like this and will
most likely fail.
</p>
        <p>
          <a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_thumb.png" width="430" height="90" />
          </a>
          <strong> The
Whish</strong>
        </p>
        <p>
We would like to be able to replace the implementation of DateTime.Now with a method
that always returns the year 2000 in the context of the test. If possible, we would
like to use a strongly typed, Linq-ish, expression tree based syntax to do this. For
example, we could think that a <strong>Deq</strong> class would define a <strong>Replace(Expression&lt;Func&lt;T&gt;&gt;
method, Func&lt;T&gt; detour)</strong> method that would achieve this detour:
</p>
        <p>
          <a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_thumb_1.png" width="431" height="169" />
          </a>
        </p>
        <p>
 <strong>Implementing Deq on top of MoleRuntime</strong></p>
        <p>
The implementation of <strong>Deq.Replace</strong> relies on MoleRuntime.SetMole,
an un-typed API to replace methods that Moles builds upon. First, one needs to walk
the expression tree to extract the MethodInfo that the user wanted to replace (I’m
not showing this code here, it is beyond the point of this blog post). Once you have
the method, you can use the Moles API to install the detour. This happens through
the <strong>MoleRuntime.SetMole</strong> method and the rest is taken care of the
Moles runtime.
</p>
        <p>
          <a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_6.png">
            <img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_thumb_2.png" width="392" height="251" />
          </a>That’s
it. You’ve just written a micro-mock framework that can isolate from static methods.
</p>
        <p>
To get this code to compile, you will need a reference to Microsoft.ExtendedReflection.dll
and Microsoft.Moles.Framework.dll. Also, since the Replace method only works for the
Func&lt;T&gt; method, you’ll probably want to write a T4 template that takes care
of all the other delegates (Func&lt;T,T2&gt;, Action&lt;…&gt; etc…).
</p>
        <p>
          <strong>Deq Sources?</strong>
        </p>
        <p>
The Deq sources are available in the Samples solution that ships with <strong>Pex</strong>.
</p>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=0fa6daff-ccb4-4f75-a101-5d476167bb19" />
      </body>
      <title>Deq: Extend your favorite Mock framework with Moles</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,0fa6daff-ccb4-4f75-a101-5d476167bb19.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/05/18/DeqExtendYourFavoriteMockFrameworkWithMoles.aspx</link>
      <pubDate>Tue, 18 May 2010 16:30:10 GMT</pubDate>
      <description>&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
This post shows how you can leverage the un-typed Detours API to extend any mock framework
to support static methods, sealed types, etc…
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://research.microsoft.com/moles" target="_blank"&gt;Moles&lt;/a&gt; is an isolation
framework for .NET that the &lt;a href="http://research.microsoft.com/pex/"&gt;Pex&lt;/a&gt; team
designed to make Pex happy. It relies heavily on delegates and comes with a syntax
of its own. Moles is actually a simple strongly typed layer on top of a un-typed general
purpose detour API. If you do not like the Moles syntax, you can still leverage the
detours API to deal with static methods or sealed types.
&lt;/p&gt;
&lt;p&gt;
Let us see how we can use the detour API to build a micro-mock-framework using expressions
trees. Let’s call it &lt;strong&gt;Deq&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The Challenge&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
As usual, we’ll toy with an example where we need a very particular DateTime.Now value.
Since DateTime.Now is a struct living in mscorlib.dll, it cannot be mocked using traditional
approaches –DateTime.Now can’t be overloaded. The test case looks like this and will
most likely fail.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_thumb.png" width="430" height="90"&gt;&lt;/a&gt;&lt;strong&gt; The
Whish&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
We would like to be able to replace the implementation of DateTime.Now with a method
that always returns the year 2000 in the context of the test. If possible, we would
like to use a strongly typed, Linq-ish, expression tree based syntax to do this. For
example, we could think that a &lt;strong&gt;Deq&lt;/strong&gt; class would define a &lt;strong&gt;Replace(Expression&amp;lt;Func&amp;lt;T&amp;gt;&amp;gt;
method, Func&amp;lt;T&amp;gt; detour)&lt;/strong&gt; method that would achieve this detour:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_thumb_1.png" width="431" height="169"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;strong&gt;Implementing Deq on top of MoleRuntime&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The implementation of &lt;strong&gt;Deq.Replace&lt;/strong&gt; relies on MoleRuntime.SetMole,
an un-typed API to replace methods that Moles builds upon. First, one needs to walk
the expression tree to extract the MethodInfo that the user wanted to replace (I’m
not showing this code here, it is beyond the point of this blog post). Once you have
the method, you can use the Moles API to install the detour. This happens through
the &lt;strong&gt;MoleRuntime.SetMole&lt;/strong&gt; method and the rest is taken care of the
Moles runtime.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/DeqExtendyourfavoriteMockframeworkwithMo_766D/image_thumb_2.png" width="392" height="251"&gt;&lt;/a&gt;That’s
it. You’ve just written a micro-mock framework that can isolate from static methods.
&lt;/p&gt;
&lt;p&gt;
To get this code to compile, you will need a reference to Microsoft.ExtendedReflection.dll
and Microsoft.Moles.Framework.dll. Also, since the Replace method only works for the
Func&amp;lt;T&amp;gt; method, you’ll probably want to write a T4 template that takes care
of all the other delegates (Func&amp;lt;T,T2&amp;gt;, Action&amp;lt;…&amp;gt; etc…).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Deq Sources?&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The Deq sources are available in the Samples solution that ships with &lt;strong&gt;Pex&lt;/strong&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=0fa6daff-ccb4-4f75-a101-5d476167bb19" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,0fa6daff-ccb4-4f75-a101-5d476167bb19.aspx</comments>
      <category>Moles</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=7fdbe2c3-e5a3-41f8-a4cf-987d30e22081</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,7fdbe2c3-e5a3-41f8-a4cf-987d30e22081.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,7fdbe2c3-e5a3-41f8-a4cf-987d30e22081.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=7fdbe2c3-e5a3-41f8-a4cf-987d30e22081</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Although <a href="http://research.microsoft.com/pex/">Pex</a> is only available for
MSDN subscribers, <a href="http://research.microsoft.com/moles">Moles</a> can be <strong>freely</strong> downloaded
as a standalone tool on Visual Studio Gallery. 
</p>
        <blockquote>
          <p>
            <a title="http://visualstudiogallery.msdn.microsoft.com/en-us/b3b41648-1c21-471f-a2b0-f76d8fb932ee" href="http://visualstudiogallery.msdn.microsoft.com/en-us/b3b41648-1c21-471f-a2b0-f76d8fb932ee">http://visualstudiogallery.msdn.microsoft.com/en-us/b3b41648-1c21-471f-a2b0-f76d8fb932ee</a>
          </p>
        </blockquote>
        <p>
(off course, both tools are also available under an academic license too)
</p>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=7fdbe2c3-e5a3-41f8-a4cf-987d30e22081" />
      </body>
      <title>Get Moles for free on Visual Studio Gallery</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,7fdbe2c3-e5a3-41f8-a4cf-987d30e22081.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/05/01/GetMolesForFreeOnVisualStudioGallery.aspx</link>
      <pubDate>Sat, 01 May 2010 11:36:45 GMT</pubDate>
      <description>&lt;p&gt;
Although &lt;a href="http://research.microsoft.com/pex/"&gt;Pex&lt;/a&gt; is only available for
MSDN subscribers, &lt;a href="http://research.microsoft.com/moles"&gt;Moles&lt;/a&gt; can be &lt;strong&gt;freely&lt;/strong&gt; downloaded
as a standalone tool on Visual Studio Gallery. 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;a title="http://visualstudiogallery.msdn.microsoft.com/en-us/b3b41648-1c21-471f-a2b0-f76d8fb932ee" href="http://visualstudiogallery.msdn.microsoft.com/en-us/b3b41648-1c21-471f-a2b0-f76d8fb932ee"&gt;http://visualstudiogallery.msdn.microsoft.com/en-us/b3b41648-1c21-471f-a2b0-f76d8fb932ee&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
(off course, both tools are also available under an academic license too)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=7fdbe2c3-e5a3-41f8-a4cf-987d30e22081" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,7fdbe2c3-e5a3-41f8-a4cf-987d30e22081.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=0b1d07f2-5096-4b10-9550-a598875fadee</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,0b1d07f2-5096-4b10-9550-a598875fadee.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,0b1d07f2-5096-4b10-9550-a598875fadee.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=0b1d07f2-5096-4b10-9550-a598875fadee</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We just uploaded a new release 0.91 on MSDN, Visual Studio gallery and our research
web site. Learn more about the changes at <a href="http://research.microsoft.com/en-us/projects/pex/releasenotes.aspx#0_91">http://research.microsoft.com/en-us/projects/pex/releasenotes.aspx#0_91</a></p>
        <blockquote>
          <p>
            <a href="http://research.microsoft.com/en-us/projects/pex/downloads.aspx">
              <strong>Get
and download Pex!</strong>
            </a>
          </p>
        </blockquote>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=0b1d07f2-5096-4b10-9550-a598875fadee" />
      </body>
      <title>Pex 0.91 is out!</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,0b1d07f2-5096-4b10-9550-a598875fadee.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/04/24/Pex091IsOut.aspx</link>
      <pubDate>Sat, 24 Apr 2010 13:51:44 GMT</pubDate>
      <description>&lt;p&gt;
We just uploaded a new release 0.91 on MSDN, Visual Studio gallery and our research
web site. Learn more about the changes at &lt;a href="http://research.microsoft.com/en-us/projects/pex/releasenotes.aspx#0_91"&gt;http://research.microsoft.com/en-us/projects/pex/releasenotes.aspx#0_91&lt;/a&gt; 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;a href="http://research.microsoft.com/en-us/projects/pex/downloads.aspx"&gt;&lt;strong&gt;Get
and download Pex!&lt;/strong&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt;&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=0b1d07f2-5096-4b10-9550-a598875fadee" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,0b1d07f2-5096-4b10-9550-a598875fadee.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=c79ac40b-18ad-452a-a797-34ae627eccb1</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,c79ac40b-18ad-452a-a797-34ae627eccb1.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,c79ac40b-18ad-452a-a797-34ae627eccb1.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=c79ac40b-18ad-452a-a797-34ae627eccb1</wfw:commentRss>
      <title>Be a Pex and Moles Fan!</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,c79ac40b-18ad-452a-a797-34ae627eccb1.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/04/17/BeAPexAndMolesFan.aspx</link>
      <pubDate>Sat, 17 Apr 2010 01:06:31 GMT</pubDate>
      <description>&lt;p&gt;
Are you using &lt;a href="http://research.microsoft.com/pex/"&gt;Pex&lt;/a&gt; and/or Moles? Do
you want to become a fan (on Facebook)? It’s possible now!!! 
&lt;/p&gt;
&lt;p&gt;
&lt;script type="text/javascript" src="http://static.ak.connect.facebook.com/connect.php/en_US"&gt;&lt;/script&gt;
&lt;div id="fb-root"&gt;
&lt;/div&gt;
&lt;script&gt;window.fbAsyncInit = function() {  FB.init({    appId: "118276281518833",    xfbml: true  });};(function() {  var e = document.createElement('script'); e.async = true;  e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';  document.getElementById('fb-root').appendChild(e);}());&lt;/script&gt;
&lt;fb:fan profile_id="118276281518833" stream="0" connections="10" logobar="1" width="300"&gt;&lt;/fb:fan&gt;
&lt;div style="font-size:20px; padding-left:10px"&gt;
&lt;a href="http://www.facebook.com/pages/Pex-and-Moles/118276281518833"&gt;Pex and Moles&lt;/a&gt; on
Facebook
&lt;/div&gt;
&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=c79ac40b-18ad-452a-a797-34ae627eccb1" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,c79ac40b-18ad-452a-a797-34ae627eccb1.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=bfd29963-ee2a-4b8c-9e87-9aaf577591b5</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,bfd29963-ee2a-4b8c-9e87-9aaf577591b5.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,bfd29963-ee2a-4b8c-9e87-9aaf577591b5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=bfd29963-ee2a-4b8c-9e87-9aaf577591b5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
La presentation sur <a href="http://research.microsoft.com/pex/">Pex</a> et Moles
pour SharePoint que j’avais presente a Paris <a href="http://www.microsoft.com/france/vision/mstechdays10/Webcast.aspx?EID=078cffcc-adca-4d97-af96-96b1c9e586b2"><strong>est
online…</strong></a></p>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=bfd29963-ee2a-4b8c-9e87-9aaf577591b5" />
      </body>
      <title>[MSTD10] - Test Unitaire de Services SharePoint avec Pex et Moles</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,bfd29963-ee2a-4b8c-9e87-9aaf577591b5.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/03/24/MSTD10TestUnitaireDeServicesSharePointAvecPexEtMoles.aspx</link>
      <pubDate>Wed, 24 Mar 2010 05:02:42 GMT</pubDate>
      <description>&lt;p&gt;
La presentation sur &lt;a href="http://research.microsoft.com/pex/"&gt;Pex&lt;/a&gt; et Moles
pour SharePoint que j’avais presente a Paris &lt;a href="http://www.microsoft.com/france/vision/mstechdays10/Webcast.aspx?EID=078cffcc-adca-4d97-af96-96b1c9e586b2"&gt;&lt;strong&gt;est
online…&lt;/strong&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=bfd29963-ee2a-4b8c-9e87-9aaf577591b5" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,bfd29963-ee2a-4b8c-9e87-9aaf577591b5.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=3592eb61-e161-470f-9e9a-9eb8f8822c67</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,3592eb61-e161-470f-9e9a-9eb8f8822c67.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,3592eb61-e161-470f-9e9a-9eb8f8822c67.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=3592eb61-e161-470f-9e9a-9eb8f8822c67</wfw:commentRss>
      <slash:comments>7</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We just released an update of <a href="http://research.microsoft.com/pex/">Pex</a> on
Devlabs that adds <strong>support for Visual Studio 2010 RC </strong>(the release
also contains a number of bug fixes). Read more about it on our <a href="http://research.microsoft.com/en-us/projects/pex/releasenotes.aspx">release
notes page</a>.
</p>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=3592eb61-e161-470f-9e9a-9eb8f8822c67" />
      </body>
      <title>Pex 0.23.50215.2: Visual Studio 2010 RC support</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,3592eb61-e161-470f-9e9a-9eb8f8822c67.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/02/15/Pex023502152VisualStudio2010RCSupport.aspx</link>
      <pubDate>Mon, 15 Feb 2010 21:03:30 GMT</pubDate>
      <description>&lt;p&gt;
We just released an update of &lt;a href="http://research.microsoft.com/pex/"&gt;Pex&lt;/a&gt; on
Devlabs that adds &lt;strong&gt;support for Visual Studio 2010 RC &lt;/strong&gt;(the release
also contains a number of bug fixes). Read more about it on our &lt;a href="http://research.microsoft.com/en-us/projects/pex/releasenotes.aspx"&gt;release
notes page&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=3592eb61-e161-470f-9e9a-9eb8f8822c67" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,3592eb61-e161-470f-9e9a-9eb8f8822c67.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=2723489d-602b-4303-bb40-5a58a90b2573</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,2723489d-602b-4303-bb40-5a58a90b2573.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,2723489d-602b-4303-bb40-5a58a90b2573.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=2723489d-602b-4303-bb40-5a58a90b2573</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We just released a new version of <a href="http://research.microsoft.com/pex/">Pex
and Moles</a> that brings a number of bug fixes and various improvements to the behaviors
for SharePoint and Asp.NET.
</p>
        <p>
          <strong>Improvements</strong>
        </p>
        <ul>
          <li>
Interaction with the Source Control provider has been significantly improved for Moles 
</li>
          <li>
Support for Moles of nested types. 
</li>
          <li>
Improved logging in the Host Type 
</li>
          <li>
Improved Behaved collections 
</li>
          <li>
Added Behaved types for mscorlib and System.Web types.</li>
        </ul>
        <p>
          <strong>Bug fixes</strong>
        </p>
        <ul>
          <li>
Updated several outdated section in the documentation 
</li>
          <li>
Updated missing classes in the SharePoint samples 
</li>
          <li>
Fixed a limitation of the profiler that would silently fail to instrument certain
methods</li>
        </ul>
        <p>
          <strong>Breaking Changes</strong>
        </p>
        <ul>
          <li>
We have formalized the naming convention of Moles and Stubs and found some holes along
the way. Some mole method might have a new name under this version of the compiler.</li>
        </ul>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=2723489d-602b-4303-bb40-5a58a90b2573" />
      </body>
      <title>Pex v0.22.50128.1: Bug fixes, bug fixes, bug fixes</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,2723489d-602b-4303-bb40-5a58a90b2573.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/01/30/PexV022501281BugFixesBugFixesBugFixes.aspx</link>
      <pubDate>Sat, 30 Jan 2010 05:48:59 GMT</pubDate>
      <description>&lt;p&gt;
We just released a new version of &lt;a href="http://research.microsoft.com/pex/"&gt;Pex
and Moles&lt;/a&gt; that brings a number of bug fixes and various improvements to the behaviors
for SharePoint and Asp.NET.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Improvements&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Interaction with the Source Control provider has been significantly improved for Moles 
&lt;li&gt;
Support for Moles of nested types. 
&lt;li&gt;
Improved logging in the Host Type 
&lt;li&gt;
Improved Behaved collections 
&lt;li&gt;
Added Behaved types for mscorlib and System.Web types.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Bug fixes&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Updated several outdated section in the documentation 
&lt;li&gt;
Updated missing classes in the SharePoint samples 
&lt;li&gt;
Fixed a limitation of the profiler that would silently fail to instrument certain
methods&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Breaking Changes&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
We have formalized the naming convention of Moles and Stubs and found some holes along
the way. Some mole method might have a new name under this version of the compiler.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=2723489d-602b-4303-bb40-5a58a90b2573" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,2723489d-602b-4303-bb40-5a58a90b2573.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
      <category>Stubs</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=ec9069cd-89d0-4958-9894-e792aeda0abc</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,ec9069cd-89d0-4958-9894-e792aeda0abc.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,ec9069cd-89d0-4958-9894-e792aeda0abc.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=ec9069cd-89d0-4958-9894-e792aeda0abc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We just <a href="http://research.microsoft.com/en-us/projects/pex/downloads.aspx">released
Pex 0.21.50115.2</a>. This release brings bug fixes, a big renaming from “Stubs” to
“Moles” and improved infrastructure to build behaved types (formerly known as beavers).
</p>
        <p>
          <strong>Bug Fixes</strong>
        </p>
        <ul>
          <li>
The Moles VsHost fails to execute unit tests in different assemblies. 
</li>
          <li>
            <a href="http://research.microsoft.com/pex/">Pex</a> deletes the report folder it
is currently writing to. 
</li>
          <li>
Support for named indexers in Stubs 
</li>
          <li>
Fixed bugs in how Pex reasons about System.Convert.ToBase64, DateTime 
</li>
          <li>
Invalid support for protected members in the stubs generation</li>
        </ul>
        <p>
          <strong>Breaking changes</strong>
        </p>
        <ul>
          <li>
            <strong>The Stubs framework was renamed to Moles framework.</strong> We have decided
to make the Moles the center of the framework and as a consequence, renamed ‘Stubs’
to ‘Moles’. (This does not mean that we encourage writing untestable code, as Mole
help to make it testable. You should still refactor your code to make it testable
whenever possible, and only use Moles when that’s the only choice). The impact is
that 
<ul><li>
Microsoft.Stubs.Framework was renamed to Microsoft.Moles.Framework 
</li><li>
The moles and stubs get generated in subnamespaces ‘.Moles’ rather ‘.Stubs’. 
</li><li>
See below for the list of steps to upgrade your applications.</li></ul></li>
          <li>
            <strong>BaseMembers in Moles have been deprecated</strong>: this helper is not useful
as it can be acheive in a better way through a constructor. We decided to remove it
to reduce code size. The second reason is that BaseMembers would only work for types
inside of the same assembly, which might seem inconsistent. 
</li>
          <li>
            <strong>PexGoal.Reached is replaced by PexAssert.ReachEventually().</strong> The PexGoal
class has been integrated into PexAssert through the ReachEventually method which
should be used with the [PexAssertReachEventually] attribute. 
</li>
          <li>
            <strong>PexChoose simplified</strong>: we’ve simplified the PexChoose API; you can
now get auxiliary test inputs with a single method call: PexChoose.Value&lt;T&gt;(“foo”).</li>
        </ul>
        <p>
          <strong>Migrating from previous version of Pex</strong>
        </p>
        <p>
Since we’ve renamed Stubs to Moles, any existing .stubx files will not work anymore.
</p>
        <p>
Take a deep breath, and apply the following steps to adapt your projects:
</p>
        <ul>
          <li>
change the project reference from Microsoft.Stubs.Framework.dll to Microsoft.Moles.Framework.dll 
</li>
          <li>
rename all .stubx files to .moles, and 
<ul><li>
rename the top <strong>&lt;Stubs</strong> xml element to <strong>&lt;Moles</strong>. 
</li><li>
Change the XSD namespace to <a href="http://schemas.microsoft.com/moles/2010/">http://schemas.microsoft.com/moles/2010/</a></li><li>
Right click on the .moles file in the Solution Explorer and change the Custom Tool
Name to ‘MolesGenerator’. 
</li><li>
Delete all the nested files under the .moles files</li></ul></li>
          <li>
Remove references to any compiled .Stubs.dll files in your project 
</li>
          <li>
In general, remove all .Stubs.dll, .Stubs.xml files from your projects. 
</li>
          <li>
Rename .Stubs namespace suffixes to .Moles. 
</li>
          <li>
replace all [HostType(“Pex”)] attribute with [HostType(“Moles”)] 
</li>
          <li>
in PexAssemblyInfo.cs, 
<ul><li>
rename using Microsoft.Pex.Framework.Stubs to Microsoft.Pex.Framework.Moles 
</li><li>
rename [assembly: PexChooseAsStubFallbackBehavior] to [assembly: PexChooseAsBehavedCurrentBehavior] 
</li><li>
rename [assembly: PexChooseAsStubFallbackBehavior] to [assembly: PexChooseAsMoleCurrentBehavior]</li></ul></li>
          <li>
In general, the ‘Fallback’ prefix has been dropped in the following methods: 
<ul><li>
rename FallbackAsNotImplemented() to BehaveAsNotImplemented() 
</li><li>
rename class MoleFallbackBehavior to MoleBehaviors 
</li><li>
rename class StubFallbackBehavior to BehavedBehavors</li></ul></li>
        </ul>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=ec9069cd-89d0-4958-9894-e792aeda0abc" />
      </body>
      <title>Pex 0.21.50115.2: Bugs fixes and Stubs renamed to Moles</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,ec9069cd-89d0-4958-9894-e792aeda0abc.aspx</guid>
      <link>http://blog.dotnetwiki.org/2010/01/16/Pex021501152BugsFixesAndStubsRenamedToMoles.aspx</link>
      <pubDate>Sat, 16 Jan 2010 04:14:07 GMT</pubDate>
      <description>&lt;p&gt;
We just &lt;a href="http://research.microsoft.com/en-us/projects/pex/downloads.aspx"&gt;released
Pex 0.21.50115.2&lt;/a&gt;. This release brings bug fixes, a big renaming from “Stubs” to
“Moles” and improved infrastructure to build behaved types (formerly known as beavers).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Bug Fixes&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
The Moles VsHost fails to execute unit tests in different assemblies. 
&lt;li&gt;
&lt;a href="http://research.microsoft.com/pex/"&gt;Pex&lt;/a&gt; deletes the report folder it
is currently writing to. 
&lt;li&gt;
Support for named indexers in Stubs 
&lt;li&gt;
Fixed bugs in how Pex reasons about System.Convert.ToBase64, DateTime 
&lt;li&gt;
Invalid support for protected members in the stubs generation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Breaking changes&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Stubs framework was renamed to Moles framework.&lt;/strong&gt; We have decided
to make the Moles the center of the framework and as a consequence, renamed ‘Stubs’
to ‘Moles’. (This does not mean that we encourage writing untestable code, as Mole
help to make it testable. You should still refactor your code to make it testable
whenever possible, and only use Moles when that’s the only choice). The impact is
that 
&lt;ul&gt;
&lt;li&gt;
Microsoft.Stubs.Framework was renamed to Microsoft.Moles.Framework 
&lt;li&gt;
The moles and stubs get generated in subnamespaces ‘.Moles’ rather ‘.Stubs’. 
&lt;li&gt;
See below for the list of steps to upgrade your applications.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
&lt;strong&gt;BaseMembers in Moles have been deprecated&lt;/strong&gt;: this helper is not useful
as it can be acheive in a better way through a constructor. We decided to remove it
to reduce code size. The second reason is that BaseMembers would only work for types
inside of the same assembly, which might seem inconsistent. 
&lt;li&gt;
&lt;strong&gt;PexGoal.Reached is replaced by PexAssert.ReachEventually().&lt;/strong&gt; The PexGoal
class has been integrated into PexAssert through the ReachEventually method which
should be used with the [PexAssertReachEventually] attribute. 
&lt;li&gt;
&lt;strong&gt;PexChoose simplified&lt;/strong&gt;: we’ve simplified the PexChoose API; you can
now get auxiliary test inputs with a single method call: PexChoose.Value&amp;lt;T&amp;gt;(“foo”).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Migrating from previous version of Pex&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Since we’ve renamed Stubs to Moles, any existing .stubx files will not work anymore.
&lt;/p&gt;
&lt;p&gt;
Take a deep breath, and apply the following steps to adapt your projects:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
change the project reference from Microsoft.Stubs.Framework.dll to Microsoft.Moles.Framework.dll 
&lt;li&gt;
rename all .stubx files to .moles, and 
&lt;ul&gt;
&lt;li&gt;
rename the top &lt;strong&gt;&amp;lt;Stubs&lt;/strong&gt; xml element to &lt;strong&gt;&amp;lt;Moles&lt;/strong&gt;. 
&lt;li&gt;
Change the XSD namespace to &lt;a href="http://schemas.microsoft.com/moles/2010/"&gt;http://schemas.microsoft.com/moles/2010/&lt;/a&gt; 
&lt;li&gt;
Right click on the .moles file in the Solution Explorer and change the Custom Tool
Name to ‘MolesGenerator’. 
&lt;li&gt;
Delete all the nested files under the .moles files&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Remove references to any compiled .Stubs.dll files in your project 
&lt;li&gt;
In general, remove all .Stubs.dll, .Stubs.xml files from your projects. 
&lt;li&gt;
Rename .Stubs namespace suffixes to .Moles. 
&lt;li&gt;
replace all [HostType(“Pex”)] attribute with [HostType(“Moles”)] 
&lt;li&gt;
in PexAssemblyInfo.cs, 
&lt;ul&gt;
&lt;li&gt;
rename using Microsoft.Pex.Framework.Stubs to Microsoft.Pex.Framework.Moles 
&lt;li&gt;
rename [assembly: PexChooseAsStubFallbackBehavior] to [assembly: PexChooseAsBehavedCurrentBehavior] 
&lt;li&gt;
rename [assembly: PexChooseAsStubFallbackBehavior] to [assembly: PexChooseAsMoleCurrentBehavior]&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
In general, the ‘Fallback’ prefix has been dropped in the following methods: 
&lt;ul&gt;
&lt;li&gt;
rename FallbackAsNotImplemented() to BehaveAsNotImplemented() 
&lt;li&gt;
rename class MoleFallbackBehavior to MoleBehaviors 
&lt;li&gt;
rename class StubFallbackBehavior to BehavedBehavors&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=ec9069cd-89d0-4958-9894-e792aeda0abc" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,ec9069cd-89d0-4958-9894-e792aeda0abc.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
      <category>Stubs</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=94481ce9-f451-4d56-a4cc-c63f5625f41a</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,94481ce9-f451-4d56-a4cc-c63f5625f41a.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,94481ce9-f451-4d56-a4cc-c63f5625f41a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=94481ce9-f451-4d56-a4cc-c63f5625f41a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We just released the version 0.20 of Pex. This version brings <b>a Beavers, an extension
of Stubs to write models, a global event view in Visual Studio and many bug fixes</b>.
Beavers are a small programatic models that build upon Moles…
</p>
        <ul>
          <li>
            <b>Beavers:</b> With <b>stubs</b> and <b>moles</b>, we provided a framework to write
record/replay tests (i.e. mock-based tests) against any .NET type, interface or not.
Beavers take you to the next level and allow you to write simple implementations <b>with
behavior</b> (hence the ‘B’eaver) that can be used to replace the external system
during testing. The benefit of using Beavers is that the resulting test cases are <b>much
more robust to code changes</b> since the tests specify the state of the system, rather
than a sequence of method calls and outcomes. We will talk a lot about Beavers in
the future. Let’s take a look at an example. The following snippet uses Moles to redirect
the constructor of a Bank class, then sets up the GetAccountById(int) method to return
an instance of IAccount, etc… This is a typical test that is based record and replay.
The problem with this technique is that it is really fragile with respect to code
changes: if the code calls different methods, the test will break.<br /><a href="file:///C:\Users\jhalleux\AppData\Local\Temp\WindowsLiveWriter-429641856\supfilesBE792EA\image3.png"><b><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/clip_image002_c6acd89e-93c0-4346-9b7a-00ef70db0ff5.gif" width="439" height="238" /></b></a><br />
The same behavior can be specified using Beavers. Beaver are simple implementations
that simulate that capture enough behavior of the original code for testing. Using
Beavers, one can specify the state of the system. The functional behavior is re-factored
away in a Beaver class and reused in all tests!<br /><a href="file:///C:\Users\jhalleux\AppData\Local\Temp\WindowsLiveWriter-429641856\supfilesBE792EA\image7.png"><b><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/clip_image004_609fde1b-a04e-43dd-888b-1e9d40da1922.gif" width="422" height="141" /></b></a><b></b></li>
          <li>
            <b>Global Event View:</b> when executing multiple explorations, it was cumbersome
to go through each exploration to investigate the events (instrumentation, object
creation, etc…). We have added a view in the Pex Explorer tree view that centralizes
the events for the entire run.<br /><a href="file:///C:\Users\jhalleux\AppData\Local\Temp\WindowsLiveWriter-429641856\supfilesBE792EA\image11.png"><b><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/clip_image006_d5b8c22e-5937-43c9-9a8d-9c6e9a3c6fb1.gif" width="507" height="354" /></b></a><b></b></li>
          <li>
            <b>Beavers for SharePoint:</b> The samples that come with Pex contains a number of
Beavers for the SharePoint object model (SPList, SPListItem, SPField, etc…) that should
help you get started with testing SharePoint with Beavers. As an example, you can
compare a mole-based test (left) and a beaver-based test (right) for a simple SharePoint
service:<br /><a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/image_2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/image_thumb.png" width="304" height="299" /></a><a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/image_thumb_1.png" width="244" height="128" /></a></li>
          <li>
            <b>Bug fixes and Improvements:</b>
            <ul>
              <li>
The HostType crashes non-deterministically. 
</li>
              <li>
Visual Studio 2010 crashes when loading with a ‘DocumentSite already has a site’ error
message. 
</li>
              <li>
The Stubs code generator uses a lot of memory and may crash Visual Studio. The Stubs
generator now runs out of process and does not take down Visual Studio when it runs
out of memory. 
</li>
              <li>
The Stubs code generator detects version changes of the Stubs framework to regenerate
the stubs assemblies. 
</li>
              <li>
The Pex execution produces less warnings. We’ve reviewed our warnings and moved some,
who did not matter, as messages. 
</li>
              <li>
When a Contract.Requires is failed multiple time in a stacktrace, do not allow it. 
</li>
              <li>
The object factory guesser has partial support for internal types and internal visible
to (signed assemblies not supported). 
</li>
              <li>
The ‘add’ and ‘remove’ of events can be moled to deal with events. 
</li>
              <li>
Digger does not work in Visual Studio 2010 when no test project exists.</li>
            </ul>
          </li>
          <li>
            <b>Breaking Changes: </b>The Beavers introduced a number of refactoring that might
impact users of Stubs and Moles. The .stubx file should regenerate themselves automatically,
otherwise right click on the file and select ‘Run Custom Tool’. 
<ul><li>
Most types of the Stubs framework have been moved to sub namespaces. 
</li><li>
IStubBehavior was renamed to IBehavior 
</li><li>
StubFallbackBehavior was renamed to BehaviorFallbackBehavior 
</li><li>
PexChooseAsStubFallbackBehaviorAttribute was renamed to PexChooseAsBehavedFallbackBehaviorAttribute 
</li><li>
PexChooseStubBehavior was renamed to PexChooseBehavedBehavior 
</li><li>
PexExpectedGoalsAttribute and PexGoal.Reached(…) were renamed and refactored into
PexAssertReachEventuallyAttribute and PexAssert.ReachEventually(…);</li></ul></li>
        </ul>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=94481ce9-f451-4d56-a4cc-c63f5625f41a" />
      </body>
      <title>Pex 0.20.v0.20.41218.2: Beavers, new Event View and bugs fixes</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,94481ce9-f451-4d56-a4cc-c63f5625f41a.aspx</guid>
      <link>http://blog.dotnetwiki.org/2009/12/19/Pex020v020412182BeaversNewEventViewAndBugsFixes.aspx</link>
      <pubDate>Sat, 19 Dec 2009 02:14:57 GMT</pubDate>
      <description>&lt;p&gt;
We just released the version 0.20 of Pex. This version brings &lt;b&gt;a Beavers, an extension
of Stubs to write models, a global event view in Visual Studio and many bug fixes&lt;/b&gt;.
Beavers are a small programatic models that build upon Moles…
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Beavers:&lt;/b&gt; With &lt;b&gt;stubs&lt;/b&gt; and &lt;b&gt;moles&lt;/b&gt;, we provided a framework to write
record/replay tests (i.e. mock-based tests) against any .NET type, interface or not.
Beavers take you to the next level and allow you to write simple implementations &lt;b&gt;with
behavior&lt;/b&gt; (hence the ‘B’eaver) that can be used to replace the external system
during testing. The benefit of using Beavers is that the resulting test cases are &lt;b&gt;much
more robust to code changes&lt;/b&gt; since the tests specify the state of the system, rather
than a sequence of method calls and outcomes. We will talk a lot about Beavers in
the future. Let’s take a look at an example. The following snippet uses Moles to redirect
the constructor of a Bank class, then sets up the GetAccountById(int) method to return
an instance of IAccount, etc… This is a typical test that is based record and replay.
The problem with this technique is that it is really fragile with respect to code
changes: if the code calls different methods, the test will break.&lt;br&gt;
&lt;a href="file:///C:\Users\jhalleux\AppData\Local\Temp\WindowsLiveWriter-429641856\supfilesBE792EA\image3.png"&gt;&lt;b&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/clip_image002_c6acd89e-93c0-4346-9b7a-00ef70db0ff5.gif" width="439" height="238"&gt;&lt;/b&gt;&lt;/a&gt;
&lt;br&gt;
The same behavior can be specified using Beavers. Beaver are simple implementations
that simulate that capture enough behavior of the original code for testing. Using
Beavers, one can specify the state of the system. The functional behavior is re-factored
away in a Beaver class and reused in all tests!&lt;br&gt;
&lt;a href="file:///C:\Users\jhalleux\AppData\Local\Temp\WindowsLiveWriter-429641856\supfilesBE792EA\image7.png"&gt;&lt;b&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/clip_image004_609fde1b-a04e-43dd-888b-1e9d40da1922.gif" width="422" height="141"&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;/b&gt; 
&lt;li&gt;
&lt;b&gt;Global Event View:&lt;/b&gt; when executing multiple explorations, it was cumbersome
to go through each exploration to investigate the events (instrumentation, object
creation, etc…). We have added a view in the Pex Explorer tree view that centralizes
the events for the entire run.&lt;br&gt;
&lt;a href="file:///C:\Users\jhalleux\AppData\Local\Temp\WindowsLiveWriter-429641856\supfilesBE792EA\image11.png"&gt;&lt;b&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/clip_image006_d5b8c22e-5937-43c9-9a8d-9c6e9a3c6fb1.gif" width="507" height="354"&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;/b&gt; 
&lt;li&gt;
&lt;b&gt;Beavers for SharePoint:&lt;/b&gt; The samples that come with Pex contains a number of
Beavers for the SharePoint object model (SPList, SPListItem, SPField, etc…) that should
help you get started with testing SharePoint with Beavers. As an example, you can
compare a mole-based test (left) and a beaver-based test (right) for a simple SharePoint
service:&lt;br&gt;
&lt;a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/image_thumb.png" width="304" height="299"&gt;&lt;/a&gt; &lt;a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex0.20.2BeaversnewEventViewandbugsfixes_C162/image_thumb_1.png" width="244" height="128"&gt;&lt;/a&gt; 
&lt;li&gt;
&lt;b&gt;Bug fixes and Improvements:&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
The HostType crashes non-deterministically. 
&lt;li&gt;
Visual Studio 2010 crashes when loading with a ‘DocumentSite already has a site’ error
message. 
&lt;li&gt;
The Stubs code generator uses a lot of memory and may crash Visual Studio. The Stubs
generator now runs out of process and does not take down Visual Studio when it runs
out of memory. 
&lt;li&gt;
The Stubs code generator detects version changes of the Stubs framework to regenerate
the stubs assemblies. 
&lt;li&gt;
The Pex execution produces less warnings. We’ve reviewed our warnings and moved some,
who did not matter, as messages. 
&lt;li&gt;
When a Contract.Requires is failed multiple time in a stacktrace, do not allow it. 
&lt;li&gt;
The object factory guesser has partial support for internal types and internal visible
to (signed assemblies not supported). 
&lt;li&gt;
The ‘add’ and ‘remove’ of events can be moled to deal with events. 
&lt;li&gt;
Digger does not work in Visual Studio 2010 when no test project exists.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
&lt;b&gt;Breaking Changes: &lt;/b&gt;The Beavers introduced a number of refactoring that might
impact users of Stubs and Moles. The .stubx file should regenerate themselves automatically,
otherwise right click on the file and select ‘Run Custom Tool’. 
&lt;ul&gt;
&lt;li&gt;
Most types of the Stubs framework have been moved to sub namespaces. 
&lt;li&gt;
IStubBehavior was renamed to IBehavior 
&lt;li&gt;
StubFallbackBehavior was renamed to BehaviorFallbackBehavior 
&lt;li&gt;
PexChooseAsStubFallbackBehaviorAttribute was renamed to PexChooseAsBehavedFallbackBehaviorAttribute 
&lt;li&gt;
PexChooseStubBehavior was renamed to PexChooseBehavedBehavior 
&lt;li&gt;
PexExpectedGoalsAttribute and PexGoal.Reached(…) were renamed and refactored into
PexAssertReachEventuallyAttribute and PexAssert.ReachEventually(…);&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=94481ce9-f451-4d56-a4cc-c63f5625f41a" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,94481ce9-f451-4d56-a4cc-c63f5625f41a.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
      <category>Stubs</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=1daea68b-c2ac-432d-a374-b74834464b77</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,1daea68b-c2ac-432d-a374-b74834464b77.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,1daea68b-c2ac-432d-a374-b74834464b77.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=1daea68b-c2ac-432d-a374-b74834464b77</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
J’aurai le plaisir de presenter ‘<a href="http://www.dotnethub.be/agenda/stubs-moles-et-pex-test-unitaires-isole-et-parametrise">Stubs,
Moles and Pex</a>’ au premier rendez-vous de <a href="ttp://www.dotnethub.be">DotNetHub</a> 20
janvier 2010 a LLN. DotNetHub est <a href="http://www.dotnethub.be/">une communaute
.NET francophone recemment cree</a>. Au programme, beaucoup de demo a propos de Pex,
Stubs et Moles, et aussi d’un nouvel animal – les Beavers.
</p>
        <p>
Ce sera ma premiere presentation <strong>100% en francais</strong>, ce qui en soit
est un challenge assez interressant!
</p>
        <p>
ps: Pas d’accent sur les claviers qwerty, ce qui rend l’ecriture du francais beaucoup
plus facile :)
</p>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=1daea68b-c2ac-432d-a374-b74834464b77" />
      </body>
      <title>Stubs, Moles et Pex a Louvain-la-Neuve, le 20 janvier 2010.</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,1daea68b-c2ac-432d-a374-b74834464b77.aspx</guid>
      <link>http://blog.dotnetwiki.org/2009/12/14/StubsMolesEtPexALouvainlaNeuveLe20Janvier2010.aspx</link>
      <pubDate>Mon, 14 Dec 2009 04:39:18 GMT</pubDate>
      <description>&lt;p&gt;
J’aurai le plaisir de presenter ‘&lt;a href="http://www.dotnethub.be/agenda/stubs-moles-et-pex-test-unitaires-isole-et-parametrise"&gt;Stubs,
Moles and Pex&lt;/a&gt;’ au premier rendez-vous de &lt;a href="ttp://www.dotnethub.be"&gt;DotNetHub&lt;/a&gt; 20
janvier 2010 a LLN. DotNetHub est &lt;a href="http://www.dotnethub.be/"&gt;une communaute
.NET francophone recemment cree&lt;/a&gt;. Au programme, beaucoup de demo a propos de Pex,
Stubs et Moles, et aussi d’un nouvel animal – les Beavers.
&lt;/p&gt;
&lt;p&gt;
Ce sera ma premiere presentation &lt;strong&gt;100% en francais&lt;/strong&gt;, ce qui en soit
est un challenge assez interressant!
&lt;/p&gt;
&lt;p&gt;
ps: Pas d’accent sur les claviers qwerty, ce qui rend l’ecriture du francais beaucoup
plus facile :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=1daea68b-c2ac-432d-a374-b74834464b77" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,1daea68b-c2ac-432d-a374-b74834464b77.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
      <category>Stubs</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=f9e9f9df-45a8-4b13-bdb9-742e0aa676ac</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,f9e9f9df-45a8-4b13-bdb9-742e0aa676ac.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,f9e9f9df-45a8-4b13-bdb9-742e0aa676ac.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=f9e9f9df-45a8-4b13-bdb9-742e0aa676ac</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ll be presenting the latest development on using Moles and Pex to unit test SharePoint
2010 (or 2007) Services at the <a href="http://www.devconnections.com/shows/NED2010SP/" target="_blank">SharePoint
Connnections in Amsterdam, 18th-19th of January</a>.
</p>
        <blockquote>
          <p>
            <b>MSC26: Pex - Unit Testing of SharePoint Services that Rocks!</b>
            <br />
SharePoint Services are challenging for unit testing because it is not possible execute
the SharePoint Service without being connected to a live SharePoint site. For that
reason, most of the unit tests written for SharePoint are actually integration tests
as they need a live system to run. In this session, we show how to use Pex, an automated
test generation tool for .NET, to test SharePoint Services in isolation. From a parameterized
unit test, Pex generates a suite of closed unit tests with high code coverage. Pex
also contains a stubbing framework, Moles, that allows to detour any .NET method to
user-defined delegates, e.g. replace any call to the SharePoint Object Model by a
user-defined delegate. 
</p>
        </blockquote>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=f9e9f9df-45a8-4b13-bdb9-742e0aa676ac" />
      </body>
      <title>Pex at the SharePoint Connections in Amsterdam, 18th-19th January</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,f9e9f9df-45a8-4b13-bdb9-742e0aa676ac.aspx</guid>
      <link>http://blog.dotnetwiki.org/2009/12/04/PexAtTheSharePointConnectionsInAmsterdam18th19thJanuary.aspx</link>
      <pubDate>Fri, 04 Dec 2009 06:45:36 GMT</pubDate>
      <description>&lt;p&gt;
I’ll be presenting the latest development on using Moles and Pex to unit test SharePoint
2010 (or 2007) Services at the &lt;a href="http://www.devconnections.com/shows/NED2010SP/" target="_blank"&gt;SharePoint
Connnections in Amsterdam, 18th-19th of January&lt;/a&gt;.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;b&gt;MSC26: Pex - Unit Testing of SharePoint Services that Rocks!&lt;/b&gt;
&lt;br&gt;
SharePoint Services are challenging for unit testing because it is not possible execute
the SharePoint Service without being connected to a live SharePoint site. For that
reason, most of the unit tests written for SharePoint are actually integration tests
as they need a live system to run. In this session, we show how to use Pex, an automated
test generation tool for .NET, to test SharePoint Services in isolation. From a parameterized
unit test, Pex generates a suite of closed unit tests with high code coverage. Pex
also contains a stubbing framework, Moles, that allows to detour any .NET method to
user-defined delegates, e.g. replace any call to the SharePoint Object Model by a
user-defined delegate. 
&lt;/p&gt;
&lt;/blockquote&gt;&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=f9e9f9df-45a8-4b13-bdb9-742e0aa676ac" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,f9e9f9df-45a8-4b13-bdb9-742e0aa676ac.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=aeadd5f9-1731-4bda-9e4d-699a3a181cfa</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,aeadd5f9-1731-4bda-9e4d-699a3a181cfa.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,aeadd5f9-1731-4bda-9e4d-699a3a181cfa.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=aeadd5f9-1731-4bda-9e4d-699a3a181cfa</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We just released the Pex 0.19.41110.1 just in time for TechEd session. This version
brings an <strong>updated</strong><strong>support for Visual Studio 2010 Beta2 and
.NET 4.0 and many improvements to the Moles</strong>.
</p>
        <ul>
          <li>
            <strong>Better Dev10 Beta 2 support! </strong>We’ve upgraded our support for Visual
Studio 2010 Beta 2. This includes full support for .NET 4.0 Beta 2, the Visual Studio
Unit Test HostType and the Visual Studio integration. 
<br />
Known Beta 2 issues: 1) When running Pex for the first time, the path to Visual Studio
Unit Test is not found. You need to specify the Visual Studio ‘PublicAssemblies’ path
(“c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies”), 2)
Don’t run Pex on v2 projects, Pex will crash. 
</li>
          <li>
            <strong>Smooth generation of Stubs and Moles</strong>: when you create a stubs and
moles assembly that is not a project reference, like one of the system assemblies,
the stubs and moles code generator will automatically compile it into an assembly
and add it to the project. This dramatically increases the performance of projects
using Stubs and Moles.<br /><a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_2.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_thumb.png" width="250" height="279" /></a></li>
          <li>
            <strong>Stubs and Moles for VisualBasic.NET: </strong>the Stubs and Moles may be used
in VisualBasic.NET projects. In that case, they are embedded as a compiled assembly. 
</li>
          <li>
            <strong>Moles support for <a href="http://nunit.org" target="_blank">NUnit</a>, <a href="http://xunit.codeplex.com/" target="_blank">xUnit.Net</a> and
others:</strong> Unit tests involving Moles require the Pex profiler to work. We’ve
added a new mode to our command line runner that allows to execute your favorite unit
test framework runner under Pex. For example, the command “pex /runner=xunit.console.exe
tests.dll” will launch the xunit runner for test.dll under Pex. x64 assemblies are
still not supported.<br /><a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_thumb_1.png" width="565" height="221" /></a></li>
          <li>
            <strong>Nicer Moles Syntax:</strong> we’ve added some little tweaks to the Moles API,
such as an implicit conversion operator to the moled type, that simplifies the syntax.
Here is a small example that showcases the current syntax: step 1 moles the Bank constructor,
step 2 moles the GetAccount method and returns a mole of Account, step 3 moles the
getter and setter of the Balance property.<br />
 <a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_12.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_thumb_5.png" width="436" height="490" /></a></li>
          <li>
            <strong>Fluent Mole Binding: </strong>The Bind method returns the mole itself which
allows it to be used in a fluent fashion. Interface binding is specially useful when
you need to mole custom collections – just attach an array! For example, we attach
an array of integers to a the MyList type that implements IEnumerable&lt;int&gt;.<br />
 <a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_10.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_thumb_4.png" width="415" height="164" /></a></li>
          <li>
            <strong>Breaking Changes in Stubs and Moles:</strong>
            <ul>
              <li>
The stubs and moles code generator tool is now ‘StubsGenerator’. You need to path
this value in the property pages of your .stubx pages. 
</li>
              <li>
No more AsStub and AsMole: the AsStub and AsMole helpers were confusing and pretty
useless so we decided to reduce the amount of generated code by removing them. 
</li>
              <li>
The naming convention for Stubs delegate fields always mangles the parameter types
of the stubbed method, i.e. Foo(int) yields to a field called FooInt32. We used to
be smart about adding parameters but we decided to make the scheme stable and symmetric
with respect to the Moles. 
</li>
              <li>
The ‘FallbackBehavior’ property has been renamed to ‘InstanceFallbackBehavior’ in
both Stubs and Moles to make it more explicit.</li>
            </ul>
          </li>
        </ul>
        <p>
As usual, we’ve also fixed a number of bugs and added features that were reported
through our <a href="http://social.msdn.microsoft.com/Forums/en/pex/threads" target="_blank"><strong>MSDN
forums</strong></a>.
</p>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=aeadd5f9-1731-4bda-9e4d-699a3a181cfa" />
      </body>
      <title>Pex 0.19.41110.1: Better Visual Studio 2010 and .NET 4.0 Beta 2 Support, Smoother Moles</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,aeadd5f9-1731-4bda-9e4d-699a3a181cfa.aspx</guid>
      <link>http://blog.dotnetwiki.org/2009/11/12/Pex019411101BetterVisualStudio2010AndNET40Beta2SupportSmootherMoles.aspx</link>
      <pubDate>Thu, 12 Nov 2009 19:57:20 GMT</pubDate>
      <description>&lt;p&gt;
We just released the Pex 0.19.41110.1 just in time for TechEd session. This version
brings an &lt;strong&gt;updated&lt;/strong&gt; &lt;strong&gt;support for Visual Studio 2010 Beta2 and
.NET 4.0 and many improvements to the Moles&lt;/strong&gt;.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Better Dev10 Beta 2 support! &lt;/strong&gt;We’ve upgraded our support for Visual
Studio 2010 Beta 2. This includes full support for .NET 4.0 Beta 2, the Visual Studio
Unit Test HostType and the Visual Studio integration. 
&lt;br&gt;
Known Beta 2 issues: 1) When running Pex for the first time, the path to Visual Studio
Unit Test is not found. You need to specify the Visual Studio ‘PublicAssemblies’ path
(“c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies”), 2)
Don’t run Pex on v2 projects, Pex will crash. 
&lt;li&gt;
&lt;strong&gt;Smooth generation of Stubs and Moles&lt;/strong&gt;: when you create a stubs and
moles assembly that is not a project reference, like one of the system assemblies,
the stubs and moles code generator will automatically compile it into an assembly
and add it to the project. This dramatically increases the performance of projects
using Stubs and Moles.&lt;br&gt;
&lt;a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_thumb.png" width="250" height="279"&gt;&lt;/a&gt; 
&lt;li&gt;
&lt;strong&gt;Stubs and Moles for VisualBasic.NET: &lt;/strong&gt;the Stubs and Moles may be used
in VisualBasic.NET projects. In that case, they are embedded as a compiled assembly. 
&lt;li&gt;
&lt;strong&gt;Moles support for &lt;a href="http://nunit.org" target="_blank"&gt;NUnit&lt;/a&gt;, &lt;a href="http://xunit.codeplex.com/" target="_blank"&gt;xUnit.Net&lt;/a&gt; and
others:&lt;/strong&gt; Unit tests involving Moles require the Pex profiler to work. We’ve
added a new mode to our command line runner that allows to execute your favorite unit
test framework runner under Pex. For example, the command “pex /runner=xunit.console.exe
tests.dll” will launch the xunit runner for test.dll under Pex. x64 assemblies are
still not supported.&lt;br&gt;
&lt;a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_thumb_1.png" width="565" height="221"&gt;&lt;/a&gt; 
&lt;li&gt;
&lt;strong&gt;Nicer Moles Syntax:&lt;/strong&gt; we’ve added some little tweaks to the Moles API,
such as an implicit conversion operator to the moled type, that simplifies the syntax.
Here is a small example that showcases the current syntax: step 1 moles the Bank constructor,
step 2 moles the GetAccount method and returns a mole of Account, step 3 moles the
getter and setter of the Balance property.&lt;br&gt;
&amp;nbsp;&lt;a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_thumb_5.png" width="436" height="490"&gt;&lt;/a&gt; 
&lt;li&gt;
&lt;strong&gt;Fluent Mole Binding: &lt;/strong&gt;The Bind method returns the mole itself which
allows it to be used in a fluent fashion. Interface binding is specially useful when
you need to mole custom collections – just attach an array! For example, we attach
an array of integers to a the MyList type that implements IEnumerable&amp;lt;int&amp;gt;.&lt;br&gt;
&amp;nbsp;&lt;a href="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.dotnetwiki.org/content/binary/WindowsLiveWriter/Pex.19VisualStudio2010Beta2SupportUnitTe_C97C/image_thumb_4.png" width="415" height="164"&gt;&lt;/a&gt; 
&lt;li&gt;
&lt;strong&gt;Breaking Changes in Stubs and Moles:&lt;/strong&gt; 
&lt;ul&gt;
&lt;li&gt;
The stubs and moles code generator tool is now ‘StubsGenerator’. You need to path
this value in the property pages of your .stubx pages. 
&lt;li&gt;
No more AsStub and AsMole: the AsStub and AsMole helpers were confusing and pretty
useless so we decided to reduce the amount of generated code by removing them. 
&lt;li&gt;
The naming convention for Stubs delegate fields always mangles the parameter types
of the stubbed method, i.e. Foo(int) yields to a field called FooInt32. We used to
be smart about adding parameters but we decided to make the scheme stable and symmetric
with respect to the Moles. 
&lt;li&gt;
The ‘FallbackBehavior’ property has been renamed to ‘InstanceFallbackBehavior’ in
both Stubs and Moles to make it more explicit.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
As usual, we’ve also fixed a number of bugs and added features that were reported
through our &lt;a href="http://social.msdn.microsoft.com/Forums/en/pex/threads" target="_blank"&gt;&lt;strong&gt;MSDN
forums&lt;/strong&gt;&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=aeadd5f9-1731-4bda-9e4d-699a3a181cfa" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,aeadd5f9-1731-4bda-9e4d-699a3a181cfa.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
      <category>Stubs</category>
    </item>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=1fadab4f-ee5c-4954-b70c-8b6c317ff586</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,1fadab4f-ee5c-4954-b70c-8b6c317ff586.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,1fadab4f-ee5c-4954-b70c-8b6c317ff586.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=1fadab4f-ee5c-4954-b70c-8b6c317ff586</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ll be presenting <a href="http://www.visug.be/Eventdetails/tabid/95/EventId/18/Default.aspx">Stubs
and Moles</a> at the Visual Studio User Group on <strong>November 3rd</strong>. See
you there…
</p>
        <blockquote>
          <p>
Stubs is a lightweight framework for test stubs and detours in .NET that is entirely
based on delegates, type safe, Refactorable, debuggable and source code generated. 
<br />
Stubs also allows to replace  any .NET method with a user-defined delegate, including
non-virtual/static methods in sealed types. Stubs is fully integrated into Pex , an
automated white box test generation tool for .NET. 
<br /><a href="http://research.microsoft.com/en-us/projects/stubs/">http://research.microsoft.com/en-us/projects/stubs/</a></p>
        </blockquote>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=1fadab4f-ee5c-4954-b70c-8b6c317ff586" />
      </body>
      <title>Nov 3rd: Stubs and Moles talk at VISUG</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,1fadab4f-ee5c-4954-b70c-8b6c317ff586.aspx</guid>
      <link>http://blog.dotnetwiki.org/2009/10/25/Nov3rdStubsAndMolesTalkAtVISUG.aspx</link>
      <pubDate>Sun, 25 Oct 2009 09:45:44 GMT</pubDate>
      <description>&lt;p&gt;
I’ll be presenting &lt;a href="http://www.visug.be/Eventdetails/tabid/95/EventId/18/Default.aspx"&gt;Stubs
and Moles&lt;/a&gt; at the Visual Studio User Group on &lt;strong&gt;November 3rd&lt;/strong&gt;. See
you there…
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Stubs is a lightweight framework for test stubs and detours in .NET that is entirely
based on delegates, type safe, Refactorable, debuggable and source code generated. 
&lt;br&gt;
Stubs also allows to replace&amp;nbsp; any .NET method with a user-defined delegate, including
non-virtual/static methods in sealed types. Stubs is fully integrated into Pex , an
automated white box test generation tool for .NET. 
&lt;br&gt;
&lt;a href="http://research.microsoft.com/en-us/projects/stubs/"&gt;http://research.microsoft.com/en-us/projects/stubs/&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt;&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=1fadab4f-ee5c-4954-b70c-8b6c317ff586" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,1fadab4f-ee5c-4954-b70c-8b6c317ff586.aspx</comments>
      <category>Moles</category>
      <category>Pex</category>
      <category>Stubs</category>
    </item>
  </channel>
</rss>