﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com/blog/</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2012 (c) 2013</copyright><ttl>60</ttl><item><title>The state of Rhino Mocks</title><description>&lt;p&gt;I was asked to comment on the current state of Rhino Mocks. The current codebase is located here: &lt;a title="https://github.com/hibernating-rhinos/rhino-mocks" href="https://github.com/hibernating-rhinos/rhino-mocks"&gt;https://github.com/hibernating-rhinos/rhino-mocks&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The last commit was 2 years ago. And I am no longer actively / passively monitoring the mailing list.&lt;/p&gt; &lt;p&gt;From my perspective, Rhino Mocks is done. Done in the sense that I don’t have any interest in extending it, done in the sense that I don’t really use mocking any longer.&lt;/p&gt; &lt;p&gt;If there is anyone in the community that wants to steps in and take charge as the Rhino Mocks project leader, I would love that. Failing that, the code it there, it works quite nicely, but that is all I am going to be doing with this for the time being and the foreseeable future.&lt;/p&gt;</description><link>http://ayende.com/blog/161826/the-state-of-rhino-mocks?key=972aa9a4-53d4-466a-abd8-20c5e1363db9</link><guid>http://ayende.com/blog/161826/the-state-of-rhino-mocks?key=972aa9a4-53d4-466a-abd8-20c5e1363db9</guid><pubDate>Wed, 08 May 2013 09:00:00 GMT</pubDate></item><item><title>Rhino Mocks new location</title><description>&lt;p&gt;This is a public service announcement, mostly meant to be caught in Google, to be frank.&lt;/p&gt; &lt;p&gt;The new homepage for Rhino Mocks is: &lt;a href="http://hibernatingrhinos.com/open-source/rhino-mocks"&gt;http://hibernatingrhinos.com/open-source/rhino-mocks&lt;/a&gt;&lt;/p&gt;</description><link>http://ayende.com/blog/10241/rhino-mocks-new-location?key=bf671213-33aa-4a5f-9ef1-ffdd59464d2d</link><guid>http://ayende.com/blog/10241/rhino-mocks-new-location?key=bf671213-33aa-4a5f-9ef1-ffdd59464d2d</guid><pubDate>Wed, 01 Jun 2011 07:03:00 GMT</pubDate></item><item><title>Public Service Announcement: Git master repositories for the Rhino Tools projects</title><description>&lt;p&gt;There have been some changes, and it seems that it is hard to track them. Here are where you can find the master repositories for the rhino tools projects:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Rhino Commons - &lt;a href="https://github.com/lorenzomelato/rhino-commons"&gt;https://github.com/lorenzomelato/rhino-commons&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Rhino Service Bus- &lt;a title="https://github.com/hibernating-rhinos/rhino-esb" href="https://github.com/hibernating-rhinos/rhino-esb"&gt;https://github.com/hibernating-rhinos/rhino-esb&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Rhino Licensing - &lt;a title="https://github.com/hibernating-rhinos/rhino-licensing" href="https://github.com/hibernating-rhinos/rhino-licensing"&gt;https://github.com/hibernating-rhinos/rhino-licensing&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Rhino ETL - &lt;a title="https://github.com/hibernating-rhinos/rhino-etl" href="https://github.com/hibernating-rhinos/rhino-etl"&gt;https://github.com/hibernating-rhinos/rhino-etl&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Rhino Security - &lt;a title="https://github.com/hibernating-rhinos/rhino-security" href="https://github.com/hibernating-rhinos/rhino-security"&gt;https://github.com/hibernating-rhinos/rhino-security&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Rhino Persistent Hash Table - &lt;a title="https://github.com/hibernating-rhinos/rhino-pht" href="https://github.com/hibernating-rhinos/rhino-pht"&gt;https://github.com/hibernating-rhinos/rhino-pht&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Rhino Distributed Hash Table - &lt;a title="https://github.com/hibernating-rhinos/rhino-dht" href="https://github.com/hibernating-rhinos/rhino-dht"&gt;https://github.com/hibernating-rhinos/rhino-dht&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Rhino DSL - &lt;a title="https://github.com/hibernating-rhinos/rhino-dsl" href="https://github.com/hibernating-rhinos/rhino-dsl"&gt;https://github.com/hibernating-rhinos/rhino-dsl&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Rhino Mocks - &lt;a title="https://github.com/hibernating-rhinos/rhino-mocks" href="https://github.com/hibernating-rhinos/rhino-mocks"&gt;https://github.com/hibernating-rhinos/rhino-mocks&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Rhino Queues - &lt;a title="https://github.com/hibernating-rhinos/rhino-queues" href="https://github.com/hibernating-rhinos/rhino-queues"&gt;https://github.com/hibernating-rhinos/rhino-queues&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;</description><link>http://ayende.com/blog/4735/public-service-announcement-git-master-repositories-for-the-rhino-tools-projects?key=3e567a32-9e98-4920-835d-c3ce48a64596</link><guid>http://ayende.com/blog/4735/public-service-announcement-git-master-repositories-for-the-rhino-tools-projects?key=3e567a32-9e98-4920-835d-c3ce48a64596</guid><pubDate>Tue, 28 Dec 2010 08:07:59 GMT</pubDate></item><item><title>Rhino Mocks, Github &amp; Continuous Integration Builds</title><description>&lt;p&gt;Well, it is official now, Rhino Mocks have a new &lt;a href="http://github.com/ayende/rhino-mocks/tree/master"&gt;home&lt;/a&gt;, and it is on &lt;a href="http://github.com/ayende/rhino-mocks/tree/master"&gt;github&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;We had a chance to try several common development scenarios with it, accepting patches &amp;amp; commits from other people, and so far I can tell you that I am very impressed with the Git style workflow.&lt;/p&gt;  &lt;p&gt;However, I know that many people aren’t comfortable with Git yet, so I decided to setup things to make things easier for everyone.&lt;/p&gt;  &lt;p&gt;You can now access the output of Rhino Mocks CI process here:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://builds.hibernatingrhinos.com/builds/Rhino-Mocks"&gt;http://builds.hibernatingrhinos.com/builds/Rhino-Mocks&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://ayende.com/blog/4189/rhino-mocks-github-continuous-integration-builds?key=acb2cfbe-b438-4904-8972-58ff0495c362</link><guid>http://ayende.com/blog/4189/rhino-mocks-github-continuous-integration-builds?key=acb2cfbe-b438-4904-8972-58ff0495c362</guid><pubDate>Sat, 12 Sep 2009 03:51:26 GMT</pubDate></item><item><title>Avé! Duci novo, similis duci seneci!</title><description>&lt;p&gt;A while ago I was contacted by a friend who asked me if I am offering a commercial version of Rhino Mocks.&lt;/p&gt;  &lt;p&gt;That is not a mistake, he was working in a place where the use of Open Source Software was not allowed, and decided that the simplest way to use the tool was to go through the normal route, buy it. &lt;/p&gt;  &lt;p&gt;I wholeheartedly support this decision. :-)&lt;/p&gt;  &lt;p&gt;Considering how hard it is to make some organizations use Open Source projects, and how used those same organizations to buying software, it is probably the right decision. It make things much simpler, and you are actually supporting OSS along the way.&lt;/p&gt;  &lt;p&gt;At any rate, if you find yourself in the same position, you can just go and &lt;a href="https://euro.swreg.org/cgi-bin/s.cgi?s=82789&amp;amp;p=82789-4&amp;amp;v=0&amp;amp;d=0&amp;amp;q=1"&gt;buy Rhino Mocks&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The retail version and the OSS version are… well, look at the title, then figure it out.&lt;/p&gt;</description><link>http://ayende.com/blog/4176/ave-duci-novo-similis-duci-seneci?key=5bbee4db-eeff-40b2-b53c-a75571010fbb</link><guid>http://ayende.com/blog/4176/ave-duci-novo-similis-duci-seneci?key=5bbee4db-eeff-40b2-b53c-a75571010fbb</guid><pubDate>Sat, 05 Sep 2009 10:23:00 GMT</pubDate></item><item><title>Rhino Mocks 4.0 Planning Forum</title><description>&lt;p&gt;It was brought up in the mailing list that we should have a more structured way of managing the ideas for Rhino Mocks 4.0, I agree, and the forum is here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://nhprof.uservoice.com/pages/28152-rhino-mocks-4-0"&gt;http://nhprof.uservoice.com/pages/28152-rhino-mocks-4-0&lt;/a&gt;&lt;/p&gt;</description><link>http://ayende.com/blog/4172/rhino-mocks-4-0-planning-forum?key=1f197575-363e-41b7-8506-8f0b95af0937</link><guid>http://ayende.com/blog/4172/rhino-mocks-4-0-planning-forum?key=1f197575-363e-41b7-8506-8f0b95af0937</guid><pubDate>Fri, 04 Sep 2009 14:20:09 GMT</pubDate></item><item><title>Planning for Rhino Mocks 4.0</title><description>&lt;p&gt;Well, now that Rhino Mocks 3.6 is out of the way, we need to think about what the next version will look like.&lt;/p&gt;  &lt;p&gt;Initially, I thought to match Rhino Mocks 4.0 to the .NET 4.0 release and support mocking dynamic variables, but while this is still on the planning board, I think that it is much more important to stop and take a look at where Rhino Mocks is now and where we would like it to be.&lt;/p&gt;  &lt;p&gt;I started Rhino Mocks about 5 years ago, and the codebase has stood well in the test of time. There aren’t any nasty places and we can keep releasing new features with no major issues.&lt;/p&gt;  &lt;p&gt;However, 5 years ago the community perception of mocking was different than what it is now. Rhino Mocks hasn’t really changed significantly since it 1.1 days, for that matter, you can take a code base using Rhino Mocks for .Net 1.1 and move it to Rhino Mocks 3.6 with no issues.&lt;/p&gt;  &lt;p&gt;But one of the most frequent complaints that I have heard is that Rhino Mocks API has became too complex over the years, there are too many options and knobs that you can turn. I know that my own style of interaction testing has changed as well. &lt;/p&gt;  &lt;p&gt;The current plan for Rhino Mocks 4.0 is that we will break backward compatibility in a big way. That means that we are going to drastically simplify everything in the framework. &lt;/p&gt;  &lt;p&gt;We are still discussing this in the mailing list, but currently it looks like we will go with the following route:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Kill the dynamic, strict, partial and stub terminology. No one cares. It is a fake.&lt;/li&gt;    &lt;li&gt;Remove the record / playback API. The AAA method is much simpler.&lt;/li&gt;    &lt;li&gt;Simplify mocking options, aiming at moving as much as possible from expectation style to assert style.&lt;/li&gt;    &lt;li&gt;Keep as much of the current capabilities as we can. That means that if Rhino Mocks was able to support a scenario, it should still support it for the 4.0 version, hopefully in a simpler fashion.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The end result is putting Rhino Mocks on an API diet. I am looking for help in doing this, both in terms of suggested syntax and in terms of actual patches.&lt;/p&gt;  &lt;p&gt;You are welcome to contribute…&lt;/p&gt;</description><link>http://ayende.com/blog/4169/planning-for-rhino-mocks-4-0?key=5a752abc-8df8-4a92-ba6d-74216df854bd</link><guid>http://ayende.com/blog/4169/planning-for-rhino-mocks-4-0?key=5a752abc-8df8-4a92-ba6d-74216df854bd</guid><pubDate>Thu, 03 Sep 2009 15:45:00 GMT</pubDate></item><item><title>Rhino Mocks 3.6</title><description>&lt;p /&gt;  &lt;p&gt;This release is mostly to put out all the patches &amp;amp; fixes that went into Rhino Mocks since the 3.5 release, almost a year ago.&lt;/p&gt;  &lt;p&gt;The changes from the previous version are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Dynamic mocks and stubs will now assume that a call is match by any number of expectation. &lt;/li&gt;    &lt;li&gt;Recursive mocks (with help from webpaul) &lt;/li&gt;    &lt;li&gt;Fixing an issue with ArgManager in multi threaded scenarios (patch from Stefan Steinegger) &lt;/li&gt;    &lt;li&gt;Fixing problem with IgnoreArguments() after Do() erasing the Do() &lt;/li&gt;    &lt;li&gt;Fixing an issue with SetPropertyWithArgument improperly using LastCall. &lt;/li&gt;    &lt;li&gt;Allowing Rhino Mocks to raise events on VB6 dlls. &lt;/li&gt;    &lt;li&gt;Adding support for AssertWasCalled for getters (patch from robin clowers) &lt;/li&gt;    &lt;li&gt;Adding remoting mocks as static methods (patch from Peter Mounce) &lt;/li&gt;    &lt;li&gt;Adding a way to access the method from MethodInvocation &lt;/li&gt;    &lt;li&gt;Fixing an issue with recursive return types when making a call to record an event more than once. &lt;/li&gt;    &lt;li&gt;Various spelling &amp;amp; grammar issues (patch from Peter van der Woude) &lt;/li&gt;    &lt;li&gt;Fixing an issue with stubbing MarshalByReferenceObjects &lt;/li&gt;    &lt;li&gt;Better integration with Pex &lt;/li&gt;    &lt;li&gt;Making LambdaConstraint work better with polymorphic args &lt;/li&gt;    &lt;li&gt;Better feature parity for AAA with Record &amp;amp; Playback: Partials, Multis, and Stricts &lt;/li&gt;    &lt;li&gt;Fixing an issue with stubbing properties of generic interfaces implemented twice using different generic parameters (Alexander Groß)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;As usual, the &lt;a href="http://ayende.com/projects/rhino-mocks/downloads.aspx"&gt;download is here&lt;/a&gt;. &lt;/p&gt;</description><link>http://ayende.com/blog/4163/rhino-mocks-3-6?key=c54b1eff-cfbc-4f64-8357-79f21d64068b</link><guid>http://ayende.com/blog/4163/rhino-mocks-3-6?key=c54b1eff-cfbc-4f64-8357-79f21d64068b</guid><pubDate>Tue, 01 Sep 2009 10:13:00 GMT</pubDate></item><item><title>On PSake</title><description>&lt;p&gt;&lt;a href="http://codebetter.com/blogs/james.kovacs/archive/2008/06/27/introducing-psake.aspx"&gt;James Kovacks&lt;/a&gt; introduced &lt;a href="http://code.google.com/p/psake/"&gt;psake&lt;/a&gt; ( a power shell based build system )over a year ago, and at the time, I gave it a glance and decided that it was interesting, but not worth further investigation.&lt;/p&gt;  &lt;p&gt;This weekend, as I was restructuring my Rhino Tools project, I realized that I need to touch the build system as well. The Rhino Tools build system has been through several projects, and was originally ported from Hibernate. It is NAnt based, complex, and can do just about everything that you want expect be easily understandable.&lt;/p&gt;  &lt;p&gt;It became clear to me very quickly that it ain’t going to be easy to change the way it works, nor would it be easy to modify that to reflect the new structure. There are other issues with complex build systems, they tend to create zones of “there be dragons”, where only the initiated go, and even they go with trepidation. I decided to take advantage of the changes that I am already making to get a simpler build system.&lt;/p&gt;  &lt;p&gt;I had a couple of options open to me: Rake and Bake.&lt;/p&gt;  &lt;p&gt;Bake seemed natural, until I remember that no one touched it in a year or two. Beside, I can only stretch NIH so far :-). And while I know that people rave about rake, I did &lt;em&gt;not&lt;/em&gt; want to introduce a Ruby dependency on my build system. I know that it was an annoyance when I had to build Fluent NHibernate.&lt;/p&gt;  &lt;p&gt;One thing that I knew that I am not willing to go back to was editing XML, so I started looking at other build systems, ending up running into PSake.&lt;/p&gt;  &lt;p&gt;There are a few interesting things that reading about it brought to mind. First, NAnt doesn’t cut it anymore. It can’t build WPF applications nor handle multi targeting well. Second, I am already managing the compilation part of the build using MSBuild, thanks to Visual Studio.&lt;/p&gt;  &lt;p&gt;That leave the build system with executing msbuild, setting up directories, executing tests, running post build tools, etc.&lt;/p&gt;  &lt;p&gt;PSake handles those well, since the execution environment is the command line. The syntax is nice, just enough to specify tasks and dependencies, but everything else is just pure command line. The following is Rhino Mocks build script, using PSake:&lt;/p&gt;  &lt;blockquote&gt;   &lt;div&gt;     &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;properties { 
  $base_dir  = resolve-path .
  $lib_dir = &lt;span style="color: #006080"&gt;"$base_dir\SharedLibs"&lt;/span&gt;
  $build_dir = &lt;span style="color: #006080"&gt;"$base_dir\build"&lt;/span&gt; 
  $buildartifacts_dir = &lt;span style="color: #006080"&gt;"$build_dir\" 
  $sln_file = "&lt;/span&gt;$base_dir\Rhino.Mocks-vs2008.sln&lt;span style="color: #006080"&gt;" 
  $version = "&lt;/span&gt;3.6.0.0&lt;span style="color: #006080"&gt;"
  $tools_dir = "&lt;/span&gt;$base_dir\Tools&lt;span style="color: #006080"&gt;"
  $release_dir = "&lt;/span&gt;$base_dir\Release&lt;span style="color: #006080"&gt;"
} 

task default -depends Release

task Clean { 
  remove-item -force -recurse $buildartifacts_dir -ErrorAction SilentlyContinue 
  remove-item -force -recurse $release_dir -ErrorAction SilentlyContinue 
} 

task Init -depends Clean { 
    . .\psake_ext.ps1
    Generate-Assembly-Info `
        -file "&lt;/span&gt;$base_dir\Rhino.Mocks\Properties\AssemblyInfo.cs&lt;span style="color: #006080"&gt;" `
        -title "&lt;/span&gt;Rhino Mocks $version&lt;span style="color: #006080"&gt;" `
        -description "&lt;/span&gt;Mocking Framework &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; .NET&lt;span style="color: #006080"&gt;" `
        -company "&lt;/span&gt;Hibernating Rhinos&lt;span style="color: #006080"&gt;" `
        -product "&lt;/span&gt;Rhino Mocks $version&lt;span style="color: #006080"&gt;" `
        -version $version `
        -copyright "&lt;/span&gt;Hibernating Rhinos &amp;amp; Ayende Rahien 2004 - 2009&lt;span style="color: #006080"&gt;"
        
    Generate-Assembly-Info `
        -file "&lt;/span&gt;$base_dir\Rhino.Mocks.Tests\Properties\AssemblyInfo.cs&lt;span style="color: #006080"&gt;" `
        -title "&lt;/span&gt;Rhino Mocks Tests $version&lt;span style="color: #006080"&gt;" `
        -description "&lt;/span&gt;Mocking Framework &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; .NET&lt;span style="color: #006080"&gt;" `
        -company "&lt;/span&gt;Hibernating Rhinos&lt;span style="color: #006080"&gt;" `
        -product "&lt;/span&gt;Rhino Mocks Tests $version&lt;span style="color: #006080"&gt;" `
        -version $version `
        -clsCompliant "&lt;/span&gt;&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;&lt;span style="color: #006080"&gt;" `
        -copyright "&lt;/span&gt;Hibernating Rhinos &amp;amp; Ayende Rahien 2004 - 2009&lt;span style="color: #006080"&gt;"
        
    Generate-Assembly-Info `
        -file "&lt;/span&gt;$base_dir\Rhino.Mocks.Tests.Model\Properties\AssemblyInfo.cs&lt;span style="color: #006080"&gt;" `
        -title "&lt;/span&gt;Rhino Mocks Tests Model $version&lt;span style="color: #006080"&gt;" `
        -description "&lt;/span&gt;Mocking Framework &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; .NET&lt;span style="color: #006080"&gt;" `
        -company "&lt;/span&gt;Hibernating Rhinos&lt;span style="color: #006080"&gt;" `
        -product "&lt;/span&gt;Rhino Mocks Tests Model $version&lt;span style="color: #006080"&gt;" `
        -version $version `
        -clsCompliant "&lt;/span&gt;&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;&lt;span style="color: #006080"&gt;" `
        -copyright "&lt;/span&gt;Hibernating Rhinos &amp;amp; Ayende Rahien 2004 - 2009&lt;span style="color: #006080"&gt;"
        
    new-item $release_dir -itemType directory 
    new-item $buildartifacts_dir -itemType directory 
    cp $tools_dir\MbUnit\*.* $build_dir
} 

task Compile -depends Init { 
  exec msbuild "&lt;/span&gt;/p:OutDir=&lt;span style="color: #006080"&gt;""&lt;/span&gt;$buildartifacts_dir &lt;span style="color: #006080"&gt;""&lt;/span&gt; $sln_file&lt;span style="color: #006080"&gt;"
} 

task Test -depends Compile {
  $old = pwd
  cd $build_dir
  exec "&lt;/span&gt;.\MbUnit.Cons.exe&lt;span style="color: #006080"&gt;" "&lt;/span&gt;$build_dir\Rhino.Mocks.Tests.dll&lt;span style="color: #006080"&gt;"
  cd $old        
}

task Merge {
    $old = pwd
    cd $build_dir
    
    Remove-Item Rhino.Mocks.Partial.dll -ErrorAction SilentlyContinue 
    Rename-Item $build_dir\Rhino.Mocks.dll Rhino.Mocks.Partial.dll
    
    &amp;amp; $tools_dir\ILMerge.exe Rhino.Mocks.Partial.dll `
        Castle.DynamicProxy2.dll `
        Castle.Core.dll `
        /out:Rhino.Mocks.dll `
        /t:library `
        "&lt;/span&gt;/keyfile:$base_dir\ayende-open-source.snk&lt;span style="color: #006080"&gt;" `
        "&lt;/span&gt;/internalize:$base_dir\ilmerge.exclude&lt;span style="color: #006080"&gt;"
    if ($lastExitCode -ne 0) {
        throw "&lt;/span&gt;Error: Failed to merge assemblies!&lt;span style="color: #006080"&gt;"
    }
    cd $old
}

task Release -depends Test, Merge {
    &amp;amp; $tools_dir\zip.exe -9 -A -j `
        $release_dir\Rhino.Mocks.zip `
        $build_dir\Rhino.Mocks.dll `
        $build_dir\Rhino.Mocks.xml `
        license.txt `
        acknowledgements.txt
    if ($lastExitCode -ne 0) {
        throw "&lt;/span&gt;Error: Failed to execute ZIP command"
    }
}&lt;/pre&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is about 50 lines, all told, with a lot of spaces and is quite readable.&lt;/p&gt;

&lt;p&gt;This handles the same tasks as the old set of scripts did, and it does this without undue complexity. I like it.&lt;/p&gt;</description><link>http://ayende.com/blog/4156/on-psake?key=a139247c-a9eb-49eb-b918-41a87ed8d72c</link><guid>http://ayende.com/blog/4156/on-psake?key=a139247c-a9eb-49eb-b918-41a87ed8d72c</guid><pubDate>Sun, 30 Aug 2009 12:02:48 GMT</pubDate></item><item><title>The complexity of unity</title><description>&lt;p&gt;This post is about the Rhino Tools project. It has been running for a long time now, over 5 years, and amassed quite a few projects in it.&lt;/p&gt;  &lt;p&gt;I really like the codebase in the projects in Rhino Tools, but secondary aspects has been creeping in that made &lt;em&gt;managing&lt;/em&gt; the project harder. In particular, putting all the projects in a single repository made it easy, far &lt;em&gt;too&lt;/em&gt; easy. Projects had an easy time taking dependencies that they shouldn’t, and the entire build process was… complex, to say the least.&lt;/p&gt;  &lt;p&gt;I have been somewhat unhappily tolerant of this so far because while it was annoying, it didn’t actively create problems for me so far. The problems started creeping when I wanted to move Rhino Tools to use NHibernate 2.1. That is when I realized that this is going to be a very painful process, since I have to take on the entire Rhino Tools set of projects in one go, instead of dealing with each of them independently. the fact that so many of the dependencies where in Rhino Commons, to which I have a profound dislike, helped increase my frustration.&lt;/p&gt;  &lt;p&gt;There are other things that I find annoying now, Rhino Security is a general purpose library for NHibernate, but it makes a &lt;em&gt;lot&lt;/em&gt; of assumptions about how it is going to use, which is wrong. Rhino ETL had a dependency on Rhino Commons because of three classes.&lt;/p&gt;  &lt;p&gt;To resolve that, I decided to make a few other changes, taking dependencies is supposed to be a hard process, it is supposed to make you &lt;em&gt;think&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;I have been working on splitting the Rhino Tools projects to all its sub projects, so each of them is independent of all the others. That increase the effort of managing all of them as a unit, but decrease the effort of managing them independently. &lt;/p&gt;  &lt;p&gt;The current goals are to:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Make it simpler to treat each project independently&lt;/li&gt;    &lt;li&gt;Make it easier to deal with the management of each project (dependencies, build scripts)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;There is a side line in which I am also learning to use Git, and there is a high likelihood that the separate Rhino Tools projects will move to github. Suversion’s patching &amp;amp; tracking capabilities annoyed me for the very last time about a week ago.&lt;/p&gt;</description><link>http://ayende.com/blog/4155/the-complexity-of-unity?key=c67b137f-39fe-42a1-990f-815541e1fa4d</link><guid>http://ayende.com/blog/4155/the-complexity-of-unity?key=c67b137f-39fe-42a1-990f-815541e1fa4d</guid><pubDate>Sun, 30 Aug 2009 08:14:42 GMT</pubDate></item><item><title>Rhino Mocks 3.5 – Silverlight</title><description>&lt;p&gt;This is an alpha release only, because I don’t do anything with Silverlight. &lt;/p&gt;  &lt;p&gt;Gunther Meyer ported Rhino Mocks to Silverlight, and now you can get the bits &lt;a href="http://ayende.com/projects/rhino-mocks/downloads.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><link>http://ayende.com/blog/3843/rhino-mocks-3-5-silverlight?key=f78aaed4-a9e4-40bf-9375-64e6bacb28f2</link><guid>http://ayende.com/blog/3843/rhino-mocks-3-5-silverlight?key=f78aaed4-a9e4-40bf-9375-64e6bacb28f2</guid><pubDate>Wed, 04 Feb 2009 11:30:02 GMT</pubDate></item><item><title>KB957541 available for direct download</title><description>&lt;p&gt;This is the fix for the ExecutionEngineException that appeared in .Net 3.5 SP1, and was found by Rhino Mocks.&lt;/p&gt; &lt;p&gt;You can get it here: &lt;a title="http://support.microsoft.com/?id=957541" href="http://support.microsoft.com/?id=957541"&gt;http://support.microsoft.com/?id=957541&lt;/a&gt;&lt;/p&gt;</description><link>http://ayende.com/blog/3751/kb957541-available-for-direct-download?key=b6646e9b-2751-47ba-a832-d720f11ffecb</link><guid>http://ayende.com/blog/3751/kb957541-available-for-direct-download?key=b6646e9b-2751-47ba-a832-d720f11ffecb</guid><pubDate>Wed, 17 Dec 2008 01:54:06 GMT</pubDate></item><item><title>Broad Support, indeed</title><description>&lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/BroadSupportindeed_A6E/image_2.png"&gt;&lt;img height="42" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/BroadSupportindeed_A6E/image_thumb.png" width="575" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://ayende.com/blog/3699/broad-support-indeed?key=ce3cd231-0312-438d-bf47-70165fe00f97</link><guid>http://ayende.com/blog/3699/broad-support-indeed?key=ce3cd231-0312-438d-bf47-70165fe00f97</guid><pubDate>Thu, 13 Nov 2008 22:44:34 GMT</pubDate></item><item><title>Recursive Mocking</title><description>&lt;p&gt;This now works :-)&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/RecursiveMocking_BCFE/image_2.png"&gt;&lt;img height="345" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/RecursiveMocking_BCFE/image_thumb.png" width="706" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The challenge is still open, I intentionally stopped before completing the feature, and there is a failing test in the &lt;a href="https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/rhino-mocks/Rhino.Mocks.Tests/RecursiveMocks.cs"&gt;RecusriveMocks&lt;/a&gt; fixture that you can start from.&lt;/p&gt; &lt;p&gt;And just to give you an idea about what I am talking about, please run this and examine the results:&lt;/p&gt; &lt;p&gt;svn diff &lt;a title="https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk" href="https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk"&gt;https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk&lt;/a&gt; -r 1682:1683&lt;/p&gt; &lt;p&gt;A really cool web view of them is &lt;a href="http://demo.codesaga.com/history/RhinoTools?cs=1683"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><link>http://ayende.com/blog/3644/recursive-mocking?key=516a785f-de9a-40d0-8961-86b5b6e35e6a</link><guid>http://ayende.com/blog/3644/recursive-mocking?key=516a785f-de9a-40d0-8961-86b5b6e35e6a</guid><pubDate>Fri, 10 Oct 2008 11:40:45 GMT</pubDate></item><item><title>Request for comments: Changing the way dynamic mocks behave in Rhino Mocks</title><description>&lt;p /&gt; &lt;p&gt;I have just committed a change to the way Rhino Mocks handles expectations for dynamic mocks and stubs.  Previously, the meaning of this statement was "expect Foo() to be called once and return 1 when it does":&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;Expect.Call( bar.Foo ).Return(1);&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Now, the meaning of this is: "expect Foo() to be called one or more times, and return 1 when it does". This means that this will work:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;Assert.AreEqual(1, bar.Foo);
Assert.AreEqual(1, bar.Foo);
Assert.AreEqual(1, bar.Foo);
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Where as previously, using dynamic mocks, it would fail on the second assert, because the expectation that was setup was consumed. I think that this is a more natural way to behave, but this is a subtle breaking change.&lt;br /&gt;You can get the old behavior by specifying .Repeat.Once().&lt;/p&gt;
&lt;p&gt;Thoughts?&lt;/p&gt;</description><link>http://ayende.com/blog/3643/request-for-comments-changing-the-way-dynamic-mocks-behave-in-rhino-mocks?key=e39c0a31-e04d-4a45-b2ed-8f9b7da5a459</link><guid>http://ayende.com/blog/3643/request-for-comments-changing-the-way-dynamic-mocks-behave-in-rhino-mocks?key=e39c0a31-e04d-4a45-b2ed-8f9b7da5a459</guid><pubDate>Fri, 10 Oct 2008 10:42:00 GMT</pubDate></item><item><title>Rhino Mocks 3.5 Gems - Explicit Property Setting Expectations</title><description>&lt;p /&gt; &lt;blockquote&gt; &lt;p&gt;This post is derived from the Rhino Mocks 3.5 &lt;a href="http://ayende.com/Wiki/Rhino%20Mocks%203.5.ashx#PropertySettersExplicitExpectationAPI"&gt;documentation&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Setting expectations for property set was always very simple, and slightly confusing with Rhino Mocks. Here is how you do it:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;view.Username = "&lt;span style="color: #8b0000"&gt;the user name&lt;/span&gt;";	&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;The problem is that it is &lt;em&gt;hard&lt;/em&gt; to see that there is an expectation created here. So, with the generous help of Sebastian Jancke, we have a new syntax:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;Expect.Call(view.Username).SetPropertyWithArguments("&lt;span style="color: #8b0000"&gt;the user name&lt;/span&gt;");&lt;/pre&gt;&lt;/blockquote&gt;
&lt;blockquote /&gt;
&lt;p&gt;This is much more explicit and easier to understand. We can also set expectation on the property set, without expecting a certain value using this syntax:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt; Expect.Call(view.Username).SetPropertyAndIgnoreArguments();&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://ayende.com/blog/3639/rhino-mocks-3-5-gems-explicit-property-setting-expectations?key=ad7dc5e3-5fc4-4de0-aae1-5bbfa15f7012</link><guid>http://ayende.com/blog/3639/rhino-mocks-3-5-gems-explicit-property-setting-expectations?key=ad7dc5e3-5fc4-4de0-aae1-5bbfa15f7012</guid><pubDate>Thu, 09 Oct 2008 07:48:52 GMT</pubDate></item><item><title>Rhino Mocks Challenge: Implement This Feature</title><description>&lt;p&gt;Okay, let us see if this approach works...&lt;/p&gt;
&lt;p&gt;Here is a description of a feature that I would like to have in Rhino Mocks (modeled after a new feature in Type Mock). I don't consider this a complicated feature, and I would like to get more involvement from the community in building Rhino Mocks (see the list of all the people that helped get Rhino Mocks 3.5 out the door).&lt;/p&gt;
&lt;p&gt;The feature is fluent mocks. The idea is that this code should work:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;var mockService = MockRespository.GenerateMock&amp;lt;IMyService&amp;gt;();&lt;br /&gt;
  Expect.Call( mockService.Identity.Name ).Return("foo");&lt;br /&gt;&lt;/p&gt;

  &lt;p&gt;Assert.AreEqual("foo", mockService.Identity.Name);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Where identity is an interface.&lt;/p&gt;
&lt;p&gt;The best place to capture such semantics is in the RecordMockState.&lt;/p&gt;
&lt;p&gt;Have fun, and send me the patch :-)&lt;/p&gt;
</description><link>http://ayende.com/blog/3636/rhino-mocks-challenge-implement-this-feature?key=9b116f24-ae1b-44e4-b01e-83959a75fdb3</link><guid>http://ayende.com/blog/3636/rhino-mocks-challenge-implement-this-feature?key=9b116f24-ae1b-44e4-b01e-83959a75fdb3</guid><pubDate>Tue, 07 Oct 2008 22:41:21 GMT</pubDate></item><item><title>Rhino Mocks 3.5 RTM</title><description>&lt;p&gt;Today I decided that I had enough time to get bugs for the 3.5 RC, so I fixed all the remaining bugs, updated the &lt;a href="http://ayende.com/Wiki/Rhino+Mocks+3.5.ashx"&gt;Rhino Mocks 3.5 Documentation&lt;/a&gt;, and put the &lt;a href="http://ayende.com/projects/rhino-mocks/downloads.aspx"&gt;binaries out the site&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For this release, I actually have 4 binary packages. One for .NET 3.5 and one for .NET 2.0, but I have an additional criteria, with the castle assemblies merged (default) and with the castle assemblies included). The reason for having those two options is that people who want to &lt;a href="http://using.stormwindproject.org:8081/pages/viewpage.action?pageId=2195469"&gt;extend Rhino Mocks&lt;/a&gt; directly can do it more easily. In general, I suggest using the merged version.&lt;/p&gt;
&lt;p&gt;So, what do we actually have here (feature differences from 3.4)?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;a href="http://www.ayende.com/Blog/archive/2008/05/16/Rhino-Mocks--Arrange-Act-Assert-Syntax.aspx"&gt;Assert Act Arrange&lt;/a&gt; &lt;a href="http://www.ayende.com/Blog/archive/2008/06/13/The-test-of-fire-Rhino-Mocks-3.5-in-the-real.aspx"&gt;syntax&lt;/a&gt; for mocking

    &lt;ul&gt;
      &lt;li&gt;Including support for .NET 2.0&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;

  &lt;li&gt;Added a way to access the mocked method at runtime, using WhenCalled (similar to Do(), but without the pain of having to specify a special delegate).&lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;CreateMock() is &lt;em&gt;deprecated&lt;/em&gt; and marked with the [Obsolete] attribute. Use StrictMock() instead.&lt;/strong&gt;&lt;/li&gt;

  &lt;li&gt;Support for mocking interface in C++ that mix native and managed types. (Note, may require that you install &lt;a href="http://ayende.com/Blog/archive/2008/09/25/kb957541-is-my-favorite-hotfix.aspx"&gt;kb957541&lt;/a&gt; to get around bug introduced to the framework on SP1).&lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;New event raising syntax:&lt;br /&gt;
  eventHolder.Raise(stub =&amp;gt; stub.Blah += null, this, EventArgs.Empty);&lt;/li&gt;

  &lt;li&gt;Better support for multi threaded replays.

    &lt;ul&gt;
      &lt;li&gt;Note that access to the mock object is now serialized.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;

  &lt;li&gt;Support AssertWasCalled on parial mocks.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Patches&lt;/strong&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;From Sebastian Jancke, adding support for SetPropertyAndIgnoreArguments() and SetPropertyWithArguments( o );&lt;/li&gt;

  &lt;li&gt;From Yann Trevin, adding support for List.Element("MyKey", ...), so we are not limited to just integers.&lt;/li&gt;

  &lt;li&gt;From David Tchepak, adding support for ctor arguments when creating a mock using static method.&lt;/li&gt;

  &lt;li&gt;From Stefan Steinegger - much better support for creating inline constraints.&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Improvements:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Better handling of exception in raising events from mock objects&lt;/li&gt;

  &lt;li&gt;Better error message when trying to set expectation on properties of a stub.&lt;/li&gt;

  &lt;li&gt;Better error handling for AAA syntax abuse&lt;/li&gt;

  &lt;li&gt;Will give better errors if you call Verify on a mock that is in record mode.&lt;/li&gt;

  &lt;li&gt;Allowing to return to record mode without losing expectations.&lt;/li&gt;

  &lt;li&gt;BackToRecord extension method.&lt;/li&gt;

  &lt;li&gt;AAA syntax now works with Ordering&lt;/li&gt;

  &lt;li&gt;Better error message if trying to use SetupResult on stubbed mock properties.&lt;/li&gt;

  &lt;li&gt;Better error message when trying to mock null instance.&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;Fixing an issue with mock objects that expose methods with output parameter of type System.IntPtr.&lt;/li&gt;

  &lt;li&gt;Fixed an issue with merging, would cause issues if you are also using Castle Dynamic Proxy.&lt;/li&gt;

  &lt;li&gt;Fixed various typos&lt;/li&gt;

  &lt;li&gt;Fixed issue with mocking internal classes and interfaces.&lt;/li&gt;

  &lt;li&gt;OutRef params was not copied when creating new expectation from an existing one.&lt;/li&gt;

  &lt;li&gt;Fixing an issue with leaking expectationReplaced in mocks.&lt;/li&gt;
&lt;/ul&gt;
</description><link>http://ayende.com/blog/3630/rhino-mocks-3-5-rtm?key=69ed8b87-b287-46fb-b420-325342b9107e</link><guid>http://ayende.com/blog/3630/rhino-mocks-3-5-rtm?key=69ed8b87-b287-46fb-b420-325342b9107e</guid><pubDate>Sat, 04 Oct 2008 21:49:12 GMT</pubDate></item><item><title>How .Net 3.5 SP1 broke Rhino Mocks</title><description>&lt;p&gt;Okay, now that we are over the sensationalist headline, the actual problem is more complex than that. Let us assume that we have the following interface:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;interface&lt;/span&gt; IComplexGeneric&amp;lt;T&amp;gt;&lt;br /&gt;{&lt;br /&gt;	&lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; GenericMethod&amp;lt;K&amp;gt;();&lt;br /&gt;}&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Up until .Net 3.5 SP1, Rhino Mocks was perfectly happy to deal with such an interface (well, not &lt;em&gt;happy&lt;/em&gt;, exactly, that requires some hard core code). With .Net 3.5 SP1, this generate an Execution Engine Exception.&lt;/p&gt;
&lt;p&gt;Fabian Schmied was kind enough to prove that select &lt;em&gt;is&lt;/em&gt; broken &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=361606"&gt;here&lt;/a&gt;. This is the connect site issue, and I would appreciate it if you can vote for it. &lt;/p&gt;
&lt;p&gt;The work around for this would mean that I will have to remove support for mocking F#, C++ and Spec# from Rhino Mocks, and I am reluctant to do so.&lt;/p&gt;
&lt;p&gt;This is fixed,  you can get the fix here: &lt;a href="http://support.microsoft.com/?id=957541" title="http://support.microsoft.com/?id=957541"&gt;http://support.microsoft.com/?id=957541&lt;/a&gt;&lt;/p&gt;</description><link>http://ayende.com/blog/3517/how-net-3-5-sp1-broke-rhino-mocks?key=9c3b0b35-330f-466a-83c6-6e655cbe02fe</link><guid>http://ayende.com/blog/3517/how-net-3-5-sp1-broke-rhino-mocks?key=9c3b0b35-330f-466a-83c6-6e655cbe02fe</guid><pubDate>Wed, 13 Aug 2008 14:15:21 GMT</pubDate></item><item><title>Mocking the file system</title><description>&lt;p&gt;I have the following piece of code:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Mockingthefilesystem_47F1/image_2.png"&gt;&lt;img height="499" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Mockingthefilesystem_47F1/image_thumb.png" width="719" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And I wasn't sure about how I can test this thing. For production, this will use a File Stream, and getting those to produce errors is non trivial in most situations. A bit of thinking, however, told me that I can write a test for the error handling section of this fairly easily, like this:&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Mockingthefilesystem_47F1/image_4.png"&gt;&lt;img height="338" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Mockingthefilesystem_47F1/image_thumb_1.png" width="719" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I love having powerful tools at my reach.&lt;/p&gt;</description><link>http://ayende.com/blog/3451/mocking-the-file-system?key=786b8a8a-483e-4930-ae97-1d63bfb26cff</link><guid>http://ayende.com/blog/3451/mocking-the-file-system?key=786b8a8a-483e-4930-ae97-1d63bfb26cff</guid><pubDate>Sun, 27 Jul 2008 02:07:11 GMT</pubDate></item></channel></rss>