﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Intro to NMock</title>
	<atom:link href="http://www.peteonsoftware.com/index.php/2008/12/21/intro-to-nmock/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.peteonsoftware.com/index.php/2008/12/21/intro-to-nmock/</link>
	<description></description>
	<lastBuildDate>Fri, 03 Sep 2010 10:18:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Urs Enzler - NMock2 dev team</title>
		<link>http://www.peteonsoftware.com/index.php/2008/12/21/intro-to-nmock/comment-page-1/#comment-939</link>
		<dc:creator>Urs Enzler - NMock2 dev team</dc:creator>
		<pubDate>Mon, 22 Dec 2008 14:02:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=81#comment-939</guid>
		<description>Nice article Pete.

Some comments about your sample code:

IBlogEntry mockBlogEntry = (IBlogEntry) mockery.NewMock(typeof (IBlogEntry));

you can use

IBlogEntry mockBlogEntry = mockery.NewMock();
           
            Expect.Once.On(mockBlogEntry).Method(&quot;SavePost&quot;).WithNoArguments().Will(Return.Value(true));

WithNoArguments is not needed if this is the only overload.

            
If you want to have a look at the latest and (hopefully) greatest version then have a look at http://sourceforge.net/projects/nmock2/ which is based on the version from nmock.org and offers a bunch of new functionality.

Happy mocking 
Urs</description>
		<content:encoded><![CDATA[<p>Nice article Pete.</p>
<p>Some comments about your sample code:</p>
<p>IBlogEntry mockBlogEntry = (IBlogEntry) mockery.NewMock(typeof (IBlogEntry));</p>
<p>you can use</p>
<p>IBlogEntry mockBlogEntry = mockery.NewMock();</p>
<p>            Expect.Once.On(mockBlogEntry).Method(&#8220;SavePost&#8221;).WithNoArguments().Will(Return.Value(true));</p>
<p>WithNoArguments is not needed if this is the only overload.</p>
<p>If you want to have a look at the latest and (hopefully) greatest version then have a look at <a href="http://sourceforge.net/projects/nmock2/" rel="nofollow">http://sourceforge.net/projects/nmock2/</a> which is based on the version from nmock.org and offers a bunch of new functionality.</p>
<p>Happy mocking<br />
Urs</p>
]]></content:encoded>
	</item>
</channel>
</rss>
