<?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: Catching Arguments with Rhino Mocks</title>
	<atom:link href="http://lostechies.com/chadmyers/2008/09/26/catching-arguments-with-rhino-mocks/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/chadmyers/2008/09/26/catching-arguments-with-rhino-mocks/</link>
	<description>Software development, testing, and techie life</description>
	<lastBuildDate>Thu, 08 Mar 2012 22:19:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: David</title>
		<link>http://lostechies.com/chadmyers/2008/09/26/catching-arguments-with-rhino-mocks/#comment-633</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 26 Sep 2008 09:03:58 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/09/25/catching-arguments-with-rhino-mocks.aspx#comment-633</guid>
		<description>Oops, still need to create the mock then. Please disregard last comment :)</description>
		<content:encoded><![CDATA[<p>Oops, still need to create the mock then. Please disregard last comment :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://lostechies.com/chadmyers/2008/09/26/catching-arguments-with-rhino-mocks/#comment-632</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 26 Sep 2008 08:53:57 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2008/09/25/catching-arguments-with-rhino-mocks.aspx#comment-632</guid>
		<description>Hi Chad,

There is already a method to do this, GetArgumentsForCallsMadeOn(), although the syntax is not quite as neat as your version.

E.g.:

[Fact]
public void Can_check_argument_with_Rhino_Mocks() {
    var testMock = MockRepository.GenerateMock&lt;IAmJustForTesting&gt;();
    testMock.DoSomething(10, &quot;test&quot;);
    string secondArgOfFirstCall = testMock
                                      .GetArgumentsForCallsMadeOn(x =&gt; x.DoSomething(0, null))
                                      .First()
                                      [1] as string;
    Assert.Equal(&quot;test&quot;, secondArgOfFirstCall);
}

public interface IAmJustForTesting {
    void DoSomething(int a, string b);
}


Cheers,
David</description>
		<content:encoded><![CDATA[<p>Hi Chad,</p>
<p>There is already a method to do this, GetArgumentsForCallsMadeOn(), although the syntax is not quite as neat as your version.</p>
<p>E.g.:</p>
<p>[Fact]<br />
public void Can_check_argument_with_Rhino_Mocks() {<br />
    var testMock = MockRepository.GenerateMock<iamjustfortesting>();<br />
    testMock.DoSomething(10, &#8220;test&#8221;);<br />
    string secondArgOfFirstCall = testMock<br />
                                      .GetArgumentsForCallsMadeOn(x => x.DoSomething(0, null))<br />
                                      .First()<br />
                                      [1] as string;<br />
    Assert.Equal(&#8220;test&#8221;, secondArgOfFirstCall);<br />
}</p>
<p>public interface IAmJustForTesting {<br />
    void DoSomething(int a, string b);<br />
}</p>
<p>Cheers,<br />
David</iamjustfortesting></p>
]]></content:encoded>
	</item>
</channel>
</rss>
